Merge branch 'jk/asan-build-fix' into maint

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-02-14 12:42:29 -08:00
commit 54bbadaeca
2 changed files with 8 additions and 0 deletions

View file

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

View file

@ -41,6 +41,11 @@
extern "C" {
#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
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