Skip to content

Commit 54bbada

Browse files
committed
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
2 parents 8dbeba1 + f65d07f commit 54bbada

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
@@ -1220,6 +1220,9 @@ endif
12201220
ifneq ($(filter leak,$(SANITIZERS)),)
12211221
BASIC_CFLAGS += -DSUPPRESS_ANNOTATED_LEAKS
12221222
endif
1223+
ifneq ($(filter address,$(SANITIZERS)),)
1224+
NO_REGEX = NeededForASAN
1225+
endif
12231226
endif
12241227

12251228
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)