Currently many allocator specific errors (OOM, for example) are reported as
a text message and CHECK(0) termination, not stack, no details, not too
helpful nor informative. To improve the situation, ASan detailed errors were
defined and reported under the appropriate conditions.
Details
- Reviewers
eugenis - Commits
- rG0ee5a5577c38: [ASan] Disable new ASan error reporting tests on various ARMs.
rGb43b5580127c: [ASan] Disable aligned_alloc-alignment.cc on PPC64.
rG239533319f1a: [ASan] Disable aligned_alloc-alignment.cc on ppc64be
rG5062d7a22d94: [ASan] Disable aligned_alloc-alignment.cc test on gcc.
rGb276621d3d73: [ASan] Disable aligned_alloc-alignment.cc on Android.
rG506b8388ed87: [ASan] Add aligned_alloc declaration to aligned_alloc-alignment.cc test.
rG10f50a44c1fa: [ASan] Report proper ASan error on allocator failures instead of CHECK(0)-ing
rL328849: [ASan] Disable new ASan error reporting tests on various ARMs.
rCRT328849: [ASan] Disable new ASan error reporting tests on various ARMs.
rL328753: [ASan] Disable aligned_alloc-alignment.cc on PPC64.
rCRT328753: [ASan] Disable aligned_alloc-alignment.cc on PPC64.
rL328742: [ASan] Disable aligned_alloc-alignment.cc on ppc64be
rCRT328742: [ASan] Disable aligned_alloc-alignment.cc on ppc64be
rL328741: [ASan] Disable aligned_alloc-alignment.cc test on gcc.
rCRT328741: [ASan] Disable aligned_alloc-alignment.cc test on gcc.
rCRT328734: [ASan] Disable aligned_alloc-alignment.cc on Android.
rL328734: [ASan] Disable aligned_alloc-alignment.cc on Android.
rCRT328726: [ASan] Add aligned_alloc declaration to aligned_alloc-alignment.cc test.
rL328726: [ASan] Add aligned_alloc declaration to aligned_alloc-alignment.cc test.
rCRT328722: [ASan] Report proper ASan error on allocator failures instead of CHECK(0)-ing
rL328722: [ASan] Report proper ASan error on allocator failures instead of CHECK(0)-ing
Diff Detail
- Repository
- rCRT Compiler Runtime
- Build Status
Buildable 16279 Build 16279: arc lint + arc unit
Event Timeline
lib/asan/asan_errors.h | ||
---|---|---|
26 | That was the plan, to update the rest in a separate patch, just did not want to add unrelated changes here. |
- Do not call SetAllocatorOutOfMemory in new interceptors
SetAllocatorOutOfMemory should not be called in new interceptors,
it should be called when OOM is actually detected and asan allocator
takes care of that.
Looks fine.
lib/asan/asan_allocator.cc | ||
---|---|---|
600–601 | Please double check that "stack" is not used after it is deallocated. |
lib/asan/asan_allocator.cc | ||
---|---|---|
600–601 | Yep, QuarantineCallback instance is not stored anywhere, it is used in the context of Put() call only. |
- Pass caller stack to quarantine callback to report on OOM.
- SetAllocatorOutOfMemory should not be called in new interceptors,
- Disable LSan allocator test in LSan standalone mode.
This will not work with fast_unwind_on_fatal because there are no frame pointers. How hard is it to pass the stack down from the caller?