This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Allow BackgroundThread to not depend on StackDepot
ClosedPublic

Authored by cryptoad on Apr 4 2018, 3:45 PM.

Details

Summary

Still pursuing the ultimate goal of splitting the Symbolizer code from
RTSanitizerCommon core, allow BackgroundThread to work even when not linked
with sanitizer_stackdepot.cc. There is no reason this function should pull in
the whole StackDepot if symbolization is not supported.

Currently this has no functional change as the depot is always linked anyway.

Diff Detail

Event Timeline

cryptoad created this revision.Apr 4 2018, 3:45 PM
Herald added subscribers: Restricted Project, delcypher, kubamracek. · View Herald TranscriptApr 4 2018, 3:45 PM
alekseyshl accepted this revision.Apr 9 2018, 8:49 AM
This revision is now accepted and ready to land.Apr 9 2018, 8:49 AM
cryptoad updated this revision to Diff 141675.Apr 9 2018, 10:03 AM

I had to change from a weak default implementation to a weak definition
otherwise Android would fail with:

==19013==AddressSanitizer: libc interceptors initialized
|| `[0xb27a8000, 0xbfffffff]` || HighMem    ||
|| `[0xb0c9d000, 0xb27a7fff]` || HighShadow ||
|| `[0xadc9d000, 0xb0c9cfff]` || ShadowGap  ||
|| `[0x9a7a8000, 0xadc9cfff]` || LowShadow  ||
|| `[0x00000000, 0x9a7a7fff]` || LowMem     ||
MemToShadow(shadow): 0xadc9d000 0xb033b9ff 0xb093ba00 0xb0c9cfff
redzone=16
max_redzone=2048
quarantine_size_mb=10M
thread_local_quarantine_size_kb=64K
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 0x9a7a8000
==19013==Installed the sigaction for signal 11
==19013==Installed the sigaction for signal 7
==19013==Installed the sigaction for signal 8
==19013==T0: stack [0xbf157000,0xbf957000) size 0x800000; local=0xbf953808
==19013==AddressSanitizer Init done
stack corruption detected (-fstack-protector)
Aborted
alekseyshl accepted this revision.Apr 9 2018, 10:15 AM
This revision was automatically updated to reflect the committed changes.