Browse Source

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
maint
Junio C Hamano 5 years ago
parent
commit
54bbadaeca
  1. 3
      Makefile
  2. 5
      compat/regex/regex.h

3
Makefile

@ -1220,6 +1220,9 @@ endif @@ -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

5
compat/regex/regex.h

@ -41,6 +41,11 @@ @@ -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

Loading…
Cancel
Save