diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-24 08:22:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-26 17:41:24 +0100 |
commit | 8336c1b579b6dff361e5422ebcdd225056752ed4 (patch) | |
tree | 24b2f7afbb9e283d4ef721e655cfea27a8c49ec9 /external/firebird | |
parent | 3dec53d3d6bf65843d2bd3ec5781a0a2bffb0457 (diff) |
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@redhat.com>
Diffstat (limited to 'external/firebird')
-rw-r--r-- | external/firebird/ubsan.patch | 20 |
1 files changed, 20 insertions, 0 deletions
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; + } |