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.