1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-26 10:03:34 +03:00

gitlab-ci: Enable all "integer" sanitizers

This commit is contained in:
Nick Wellnhofer 2023-03-12 14:45:14 +01:00
parent 207ebdfd2a
commit 8c2e508b5e
3 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,7 @@ clang:asan:
variables:
CONFIG: "--without-python"
CC: clang
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,unsigned-integer-overflow,implicit-conversion -fno-sanitize-recover=all -Wno-error=cast-align"
CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,integer -fno-sanitize-recover=all -Wno-error=cast-align"
UBSAN_OPTIONS: "print_stacktrace=1"
ASAN_SYMBOLIZER_PATH: "$CI_PROJECT_DIR/.gitlab-ci/llvm-symbolizer"

2
dict.c
View File

@ -354,6 +354,7 @@ found_pool:
#ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif
static uint32_t
xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) {
@ -389,6 +390,7 @@ xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) {
*/
#ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif
static unsigned long
xmlDictComputeBigQKey(const xmlChar *prefix, int plen,

2
hash.c
View File

@ -78,6 +78,7 @@ struct _xmlHashTable {
*/
#ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif
static unsigned long
xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
@ -111,6 +112,7 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
#ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif
static unsigned long
xmlHashComputeQKey(xmlHashTablePtr table,