[Libreoffice-commits] core.git: external/firebird
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 26 16:42:06 UTC 2020
external/firebird/ubsan.patch | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
New commits:
commit 8336c1b579b6dff361e5422ebcdd225056752ed4
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Nov 24 08:22:51 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 26 17:41:24 2020 +0100
New UBSan failures with Firebird 3.0.7
While building ExternalProject_firebird: For one, the ICU UCHAR_TYPE mismatch
> workdir/UnpackedTarball/firebird/src/intl/cs_icu.cpp:66:30: runtime error: call to function ucnv_fromUChars_68 through pointer to incorrect function type 'int (*)(UConverter *, char *, int, const unsigned short *, int, UErrorCode *)'
from 61411db9f719d793f0665a4d278e0748e8fcd75f "external/firebird: ICU_UCHAR_TYPE
breaks -fsanitize=function" returned in a slightly different form. Instead of
passing in the problematic UCHAR_TYPE macro from
external/firebird/ExternalProject_firebird.mk, Firebird now set it internally in
src/common/common.h. And for another, it grew a new invalid-shift-base at
> workdir/UnpackedTarball/firebird/src/yvalve/gds.cpp:2564:33: runtime error: left shift of negative value -1
(And beyond that there were no further new ASan/UBSan issues with a full `make
check screenshot`.)
Change-Id: Ie15cf6bde2df7dc784fec89045026f71747aa0bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106477
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/external/firebird/ubsan.patch b/external/firebird/ubsan.patch
index cd71997f0ba6..fa296108d3d6 100644
--- a/external/firebird/ubsan.patch
+++ b/external/firebird/ubsan.patch
@@ -86,6 +86,15 @@
return *this;
}
StringType& assign(const_pointer s)
+--- src/common/common.h
++++ src/common/common.h
+@@ -1002,6 +1002,5 @@
+ }
+
+ #undef UCHAR_TYPE
+-#define UCHAR_TYPE uint16_t
+
+ #endif /* COMMON_COMMON_H */
--- src/common/unicode_util.cpp
+++ src/common/unicode_util.cpp
@@ -187,7 +187,7 @@
@@ -285,3 +294,14 @@
SRQ_PTR enqueue(thread_db*, Firebird::CheckStatusWrapper*, SRQ_PTR, const USHORT,
const UCHAR*, const USHORT, UCHAR, lock_ast_t, void*, SINT64, SSHORT, SRQ_PTR);
+--- src/yvalve/gds.cpp
++++ src/yvalve/gds.cpp
+@@ -2561,7 +2561,7 @@
+ value += ((SLONG) *ptr++) << shift;
+ shift += 8;
+ }
+- value += ((SLONG)(SCHAR) *ptr) << shift;
++ value += ((ULONG)(SCHAR) *ptr) << shift;
+
+ return value;
+ }
More information about the Libreoffice-commits
mailing list