This is an archive of the discontinued LLVM Phabricator instance.

Add new asan_option: paranoid_stack_cmp
Needs ReviewPublic

Authored by wenduo on Jun 13 2018, 7:32 AM.

Details

Reviewers
morehouse
kcc
Summary

This patch adds a new asan_option : paranoid_stack_cmp (default true). See discuss on: https://github.com/google/sanitizers/issues/797

Now, in hot function StackDepotPut, asan compares stack trace frame by frame even if stack trace's hash are the same. If user's program have a lof of malloc/free ,this operation makes cpu usage really high. Adjusting malloc_conext_size to 3(or 0) will help, but also destory the power to report bugs.

If two stacktrace's hash are the same, they are very likely to be the same.So comparing stacktrace frame by frame is a bit paranoid.

New option paranoid_stack_cmp offer user a method to turn on/turn off frame comparation. So user can trade off between cpu usage and 100% correctness
This option is on by default to keep consistent with raw version.

Diff Detail

Repository
rL LLVM

Event Timeline

wenduo created this revision.Jun 13 2018, 7:32 AM
wenduo edited the summary of this revision. (Show Details)Jun 13 2018, 7:33 AM
wenduo edited the summary of this revision. (Show Details)