diff options
| author | Paul Eggert | 2017-05-17 10:58:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-05-17 10:59:02 -0700 |
| commit | 709259dcc501ef991991a35a6ffb2aef02a62c60 (patch) | |
| tree | d95fddd7d935d8ecc12409ae3c3f7afe1bfa38b1 /src | |
| parent | 937ff1a0af1813875f851987ca5c4ac833ca3c97 (diff) | |
| download | emacs-709259dcc501ef991991a35a6ffb2aef02a62c60.tar.gz emacs-709259dcc501ef991991a35a6ffb2aef02a62c60.zip | |
Work around AddressSanitizer bug with vfork
Problem reported by Jim Meyering in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00246.html
* src/conf_post.h (vfork) [ADDRESS_SANITIZER]: Define to fork.
Unfortunately with the AddressSanitizer in Fedora 25 x86-64, the
vforked child messes up the parent’s shadow memory. This is too
bad, as we’d rather have AddressSanitizer catch memory-access bugs
related to vfork.
Diffstat (limited to 'src')
| -rw-r--r-- | src/conf_post.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_post.h b/src/conf_post.h index 4fc0428df5a..1462bd16c75 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -302,6 +302,12 @@ extern int emacs_setenv_TZ (char const *); | |||
| 302 | # define ATTRIBUTE_NO_SANITIZE_ADDRESS | 302 | # define ATTRIBUTE_NO_SANITIZE_ADDRESS |
| 303 | #endif | 303 | #endif |
| 304 | 304 | ||
| 305 | /* gcc -fsanitize=address does not work with vfork in Fedora 25 x86-64. | ||
| 306 | For now, assume that this problem occurs on all platforms. */ | ||
| 307 | #if ADDRESS_SANITIZER && !defined vfork | ||
| 308 | # define vfork fork | ||
| 309 | #endif | ||
| 310 | |||
| 305 | /* Some versions of GNU/Linux define noinline in their headers. */ | 311 | /* Some versions of GNU/Linux define noinline in their headers. */ |
| 306 | #ifdef noinline | 312 | #ifdef noinline |
| 307 | #undef noinline | 313 | #undef noinline |