Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/asan/asan_allocator.h | ||
---|---|---|
122 ↗ | (On Diff #109219) | Random question: |
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
87 ↗ | (On Diff #109248) | How about minimizing the ifdefed section and go with this: INLINE bool MaybeInDlsym() { #if SANITIZER_FUCHSIA return false; #else return asan_init_is_running; #endif } Wouldn't the compiler be smart enough to optimize out all that unused stuff? And we will have to do the same for IsInDlsymAllocPool to help it to figure that out. |
Minimal #if'ing out for alloc-inside-dlsym support, let the compiler optimize it away.
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
56 ↗ | (On Diff #109395) | Why do you need to ifdef this? |
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
56 ↗ | (On Diff #109395) | It will always be false at runtime, but the compiler can't tell that statically. |
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
56 ↗ | (On Diff #109395) | It sounds like you want all the dead code and data bloat to be there. |
No more #if to get the alloc-from-dlsym hacks compiled away, but they still get compiled away.
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
46 ↗ | (On Diff #109441) | Done, though the compiler does inline it without the keyword. |
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
35 ↗ | (On Diff #109441) | Why sizeof is gone here? |
lib/asan/asan_malloc_linux.cc | ||
---|---|---|
35 ↗ | (On Diff #109441) | Previously it was sizeof(alloc_memory_for_dlsym), the static size of the static buffer. The reason for the change is that in the SANITIZER_FUCHSIA case, the compiler can see statically that nothing ever sets allocated_for_dlsym and so it will always be zero and hence this comparison is always false and it can optimize away all the related dead code entirely. In theory the change is harmless because the offset of any allocated block will be less than the current count. |