diff options
| author | John Wiegley | 2012-07-11 01:14:27 -0500 |
|---|---|---|
| committer | John Wiegley | 2012-07-11 01:14:27 -0500 |
| commit | b41253a389afdffde3d2551e4c165f0ebbafdf89 (patch) | |
| tree | 772126439a523aa0e2d961a232d7e25a3aae5e92 /src/alloc.c | |
| parent | d923b542aa2d115bb87e72e156be837cea752536 (diff) | |
| download | emacs-b41253a389afdffde3d2551e4c165f0ebbafdf89.tar.gz emacs-b41253a389afdffde3d2551e4c165f0ebbafdf89.zip | |
alloc.c (mark_memory): Guard the "no_address_safety_analysis" function
attribute, so we only use it if it exists in the compiler.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index 89f2c5dbed1..ac200254b8c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4641,12 +4641,14 @@ mark_maybe_pointer (void *p) | |||
| 4641 | 4641 | ||
| 4642 | static void | 4642 | static void |
| 4643 | mark_memory (void *start, void *end) | 4643 | mark_memory (void *start, void *end) |
| 4644 | #ifdef __clang__ | 4644 | #if defined (__clang__) && defined (__has_feature) |
| 4645 | #if __has_feature(address_sanitizer) | ||
| 4645 | /* Do not allow -faddress-sanitizer to check this function, since it | 4646 | /* Do not allow -faddress-sanitizer to check this function, since it |
| 4646 | crosses the function stack boundary, and thus would yield many | 4647 | crosses the function stack boundary, and thus would yield many |
| 4647 | false positives. */ | 4648 | false positives. */ |
| 4648 | __attribute__((no_address_safety_analysis)) | 4649 | __attribute__((no_address_safety_analysis)) |
| 4649 | #endif | 4650 | #endif |
| 4651 | #endif | ||
| 4650 | { | 4652 | { |
| 4651 | void **pp; | 4653 | void **pp; |
| 4652 | int i; | 4654 | int i; |