aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorPaul Eggert2018-06-08 23:53:58 -0700
committerPaul Eggert2018-06-08 23:54:50 -0700
commit49ba7544c2ebbcfc50ce1e02add6bd739f475c4c (patch)
tree69b5814b49dff5c92492ce068492e44e74c51b7e /src/alloc.c
parentc67befd662571a822f3183c114ce3b1ad02e0ed9 (diff)
downloademacs-49ba7544c2ebbcfc50ce1e02add6bd739f475c4c.tar.gz
emacs-49ba7544c2ebbcfc50ce1e02add6bd739f475c4c.zip
Remove AddressSanitizer bug workaround
This workaround no longer appears to be needed. * src/alloc.c (USE_ALIGNED_ALLOC): Don’t leave undefined merely because ADDRESS_SANITIZER is defined, as that bug in -fsanitize=address appears to have been fixed. See: https://github.com/google/sanitizers/issues/337 * src/conf_post.h (vfork): Improve comment.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 4186347440c..f600c89ae2c 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1146,11 +1146,10 @@ lisp_free (void *block)
1146verify (POWER_OF_2 (BLOCK_ALIGN)); 1146verify (POWER_OF_2 (BLOCK_ALIGN));
1147 1147
1148/* Use aligned_alloc if it or a simple substitute is available. 1148/* Use aligned_alloc if it or a simple substitute is available.
1149 Address sanitization breaks aligned allocation, as of gcc 4.8.2 and 1149 Aligned allocation is incompatible with unexmacosx.c, so don't use
1150 clang 3.3 anyway. Aligned allocation is incompatible with 1150 it on Darwin unless CANNOT_DUMP. */
1151 unexmacosx.c, so don't use it on Darwin. */
1152 1151
1153#if ! ADDRESS_SANITIZER && !defined DARWIN_OS 1152#if !defined DARWIN_OS || defined CANNOT_DUMP
1154# if (defined HAVE_ALIGNED_ALLOC \ 1153# if (defined HAVE_ALIGNED_ALLOC \
1155 || (defined HYBRID_MALLOC \ 1154 || (defined HYBRID_MALLOC \
1156 ? defined HAVE_POSIX_MEMALIGN \ 1155 ? defined HAVE_POSIX_MEMALIGN \
@@ -1446,7 +1445,7 @@ laligned (void *p, size_t size)
1446static void * 1445static void *
1447lmalloc (size_t size) 1446lmalloc (size_t size)
1448{ 1447{
1449#if USE_ALIGNED_ALLOC 1448#ifdef USE_ALIGNED_ALLOC
1450 if (! MALLOC_IS_GC_ALIGNED && size % GCALIGNMENT == 0) 1449 if (! MALLOC_IS_GC_ALIGNED && size % GCALIGNMENT == 0)
1451 return aligned_alloc (GCALIGNMENT, size); 1450 return aligned_alloc (GCALIGNMENT, size);
1452#endif 1451#endif