[Bug 221337] -fsanitize=address (asan) fails on i386

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Aug 16 17:47:02 UTC 2017


--- Comment #7 from Dimitry Andric <dim at FreeBSD.org> ---
(In reply to Konstantin Belousov from comment #6)
> (In reply to Dimitry Andric from comment #5)
> Still the question is up.  Why this code wants 8-byte alignment of the TLS
> segment for module with index 1 ?
> What would not work otherwise ?

Ah sorry, that is the way upstream compiler-rt has apparently hardcoded it,
e.g. they use a define SHADOW_GRANULARITY for this, here:


   127  static const u64 kDefaultShadowScale = 3;
   145  #define SHADOW_SCALE kDefaultShadowScale

The same granularity scale values is found in the llvm instrumentation
libraries, here:

    70  static const uint64_t kDefaultShadowScale = 3;

In the past I have attempted to lower this scale to 2, but ran into hundreds of
test failures, so I abandoned that effort.  I think the assumption is working
without issue for e.g. Linux, since they left the SysV ABI a long time ago
there.  And apparently we have been lucky somehow, all this time; it has worked
well since the first time we tried AddressSanitizer, up to 12.0 before jemalloc

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list