1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-24 06:50:08 +03:00

tests: Fix sanitizer version check on old Apple clang

See #669.
This commit is contained in:
Nick Wellnhofer 2024-11-13 20:22:32 +01:00
parent b57e022d75
commit 764b8086d1
2 changed files with 4 additions and 14 deletions

View File

@ -72,7 +72,8 @@
#endif
#ifdef __clang__
#if __clang_major__ >= 12
#if (!defined(__apple_build_version__) && __clang_major__ >= 12) || \
(defined(__apple_build_version__) && __clang_major__ >= 13)
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") \
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")

View File

@ -1,3 +1,5 @@
#include "libxml.h"
#include <stdlib.h>
#include <string.h>
#include <libxml/parser.h>
@ -6,19 +8,6 @@
/**** dictionary tests ****/
#ifdef __clang__
#if __clang_major__ >= 12
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
__attribute__ ((no_sanitize("unsigned-integer-overflow"))) \
__attribute__ ((no_sanitize("unsigned-shift-base")))
#else
#define ATTRIBUTE_NO_SANITIZE_INTEGER \
__attribute__ ((no_sanitize("unsigned-integer-overflow")))
#endif
#else
#define ATTRIBUTE_NO_SANITIZE_INTEGER
#endif
/* #define WITH_PRINT */
static const char *seeds1[] = {