Merge branch 'jk/asan-build-fix'

Work around test breakages caused by custom regex engine used in
libasan, when address sanitizer is used with more recent versions
of gcc and clang.

* jk/asan-build-fix:
  Makefile: use compat regex with SANITIZE=address
This commit is contained in:
Junio C Hamano 2020-01-30 14:17:09 -08:00
commit 808dab2b58
2 changed files with 8 additions and 0 deletions

View File

@ -1221,6 +1221,9 @@ endif
ifneq ($(filter leak,$(SANITIZERS)),) ifneq ($(filter leak,$(SANITIZERS)),)
BASIC_CFLAGS += -DSUPPRESS_ANNOTATED_LEAKS BASIC_CFLAGS += -DSUPPRESS_ANNOTATED_LEAKS
endif endif
ifneq ($(filter address,$(SANITIZERS)),)
NO_REGEX = NeededForASAN
endif
endif endif
ifndef sysconfdir ifndef sysconfdir

View File

@ -41,6 +41,11 @@
extern "C" { extern "C" {
#endif #endif
#define regcomp git_regcomp
#define regexec git_regexec
#define regerror git_regerror
#define regfree git_regfree
/* The following two types have to be signed and unsigned integer type /* The following two types have to be signed and unsigned integer type
wide enough to hold a value of a pointer. For most ANSI compilers wide enough to hold a value of a pointer. For most ANSI compilers
ptrdiff_t and size_t should be likely OK. Still size of these two ptrdiff_t and size_t should be likely OK. Still size of these two