This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Allow to atomically modify malloc_context_size at runtime.
ClosedPublic

Authored by samsonov on Dec 12 2014, 1:05 PM.

Details

Summary

Introduce __asan::malloc_context_size atomic that is used to determine
required malloc/free stack trace size. It is initialized with
common_flags()->malloc_context_size flag, but can later be overwritten
at runtime (e.g. when ASan is activated / deactivated).

Diff Detail

Event Timeline

samsonov updated this revision to Diff 17244.Dec 12 2014, 1:05 PM
samsonov retitled this revision from to [ASan] Allow to atomically modify malloc_context_size at runtime..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added reviewers: kcc, eugenis.
samsonov added a subscriber: Unknown Object (MLST).
kcc added inline comments.Dec 12 2014, 3:17 PM
lib/asan/asan_stack.h
26

I'd prefer to have it a static var with a getter

samsonov updated this revision to Diff 17249.Dec 12 2014, 3:43 PM
  • Replace extern atomic with Get/Set pair.
lib/asan/asan_stack.h
26

Done

kcc accepted this revision.Dec 15 2014, 1:23 PM
kcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 15 2014, 1:23 PM
This revision was automatically updated to reflect the committed changes.