freebsd-nq/contrib/jemalloc
Dimitry Andric cc718496a9 After jemalloc was updated to version 5.0.0 in r319971, i386 executables
linked with AddressSanitizer (even those linked on earlier versions of
FreeBSD, or with external versions of clang) started failing with errors
similar to:

  ==14688==AddressSanitizer CHECK failed:
  /usr/src/contrib/compiler-rt/lib/asan/asan_poisoning.cc:36
  "((AddrIsAlignedByGranularity(addr))) != (0)" (0x0, 0x0)

This is because AddressSanitizer expects all the TLS data in the program
to be aligned to at least 8 bytes.

Before the jemalloc 5.0.0 update, all the TLS data in the i386 version
of libc.so added up to 80 bytes (a multiple of 8), but 5.0.0 made this
grow to 2404 bytes (not a multiple of 8).  This is due to added caching
data in jemalloc's internal struct tsd_s.

To fix AddressSanitizer, ensure this struct is aligned to at least 16
bytes, which can be done unconditionally for all architectures.  (An
earlier version of the fix aligned the struct to 8 bytes, but only for
ILP32 architectures.  This was deemed unnecessarily complicated.)

PR:		221337
X-MFC-With:	r319971
2017-10-23 21:31:04 +00:00
..
doc Update jemalloc to 5.0.1. 2017-07-03 23:27:57 +00:00
include/jemalloc After jemalloc was updated to version 5.0.0 in r319971, i386 executables 2017-10-23 21:31:04 +00:00
src Pick 'Remove external linkage for spin_adaptive' from upstream jemalloc 2017-08-09 22:58:42 +00:00
ChangeLog Update jemalloc to 5.0.1. 2017-07-03 23:27:57 +00:00
COPYING
FREEBSD-diffs
FREEBSD-upgrade
FREEBSD-Xlist
VERSION Update jemalloc to 5.0.1. 2017-07-03 23:27:57 +00:00