Skip to content

Commit 808dab2

Browse files
committed
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
2 parents fec1ff9 + f65d07f commit 808dab2

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,9 @@ endif
12211221
ifneq ($(filter leak,$(SANITIZERS)),)
12221222
BASIC_CFLAGS += -DSUPPRESS_ANNOTATED_LEAKS
12231223
endif
1224+
ifneq ($(filter address,$(SANITIZERS)),)
1225+
NO_REGEX = NeededForASAN
1226+
endif
12241227
endif
12251228

12261229
ifndef sysconfdir

compat/regex/regex.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
extern "C" {
4242
#endif
4343

44+
#define regcomp git_regcomp
45+
#define regexec git_regexec
46+
#define regerror git_regerror
47+
#define regfree git_regfree
48+
4449
/* The following two types have to be signed and unsigned integer type
4550
wide enough to hold a value of a pointer. For most ANSI compilers
4651
ptrdiff_t and size_t should be likely OK. Still size of these two

0 commit comments

Comments
 (0)