mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-02 11:50:48 -08:00
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.
This commit is contained in:
parent
c67befd662
commit
49ba7544c2
2 changed files with 6 additions and 6 deletions
|
|
@ -1146,11 +1146,10 @@ lisp_free (void *block)
|
|||
verify (POWER_OF_2 (BLOCK_ALIGN));
|
||||
|
||||
/* Use aligned_alloc if it or a simple substitute is available.
|
||||
Address sanitization breaks aligned allocation, as of gcc 4.8.2 and
|
||||
clang 3.3 anyway. Aligned allocation is incompatible with
|
||||
unexmacosx.c, so don't use it on Darwin. */
|
||||
Aligned allocation is incompatible with unexmacosx.c, so don't use
|
||||
it on Darwin unless CANNOT_DUMP. */
|
||||
|
||||
#if ! ADDRESS_SANITIZER && !defined DARWIN_OS
|
||||
#if !defined DARWIN_OS || defined CANNOT_DUMP
|
||||
# if (defined HAVE_ALIGNED_ALLOC \
|
||||
|| (defined HYBRID_MALLOC \
|
||||
? defined HAVE_POSIX_MEMALIGN \
|
||||
|
|
@ -1446,7 +1445,7 @@ laligned (void *p, size_t size)
|
|||
static void *
|
||||
lmalloc (size_t size)
|
||||
{
|
||||
#if USE_ALIGNED_ALLOC
|
||||
#ifdef USE_ALIGNED_ALLOC
|
||||
if (! MALLOC_IS_GC_ALIGNED && size % GCALIGNMENT == 0)
|
||||
return aligned_alloc (GCALIGNMENT, size);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -350,7 +350,8 @@ extern int emacs_setenv_TZ (char const *);
|
|||
# define ATTRIBUTE_NO_SANITIZE_UNDEFINED
|
||||
#endif
|
||||
|
||||
/* gcc -fsanitize=address does not work with vfork in Fedora 25 x86-64.
|
||||
/* gcc -fsanitize=address does not work with vfork in Fedora 28 x86-64. See:
|
||||
https://lists.gnu.org/r/emacs-devel/2017-05/msg00464.html
|
||||
For now, assume that this problem occurs on all platforms. */
|
||||
#if ADDRESS_SANITIZER && !defined vfork
|
||||
# define vfork fork
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue