"unknown module" in LeakSanitizer traces
- Dominant language
- C
- Stars
- 12.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I am seeing a lot of these with a program built with Clang 5.0.1 on ubuntu 16.04
```
Direct leak of 32768 byte(s) in 8 object(s) allocated from:
#0 0x14d2a23 in malloc /opt/media/clang_nightly/llvm/utils/release/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67:3
#1 0x7f46220c3faf ()
```
The compiler flags include the following
```
-fsanitize=address -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
```
I installed libstdc++5-dbgsym but that didn't help.
I also tried ASAN_OPTIONS="fast_unwind_on_malloc=0 malloc_context_size=2" but that didn't help with these leaks and even showed less information for other leaks which are giving proper backtraces. Using it without "malloc_context_size" doesn't seem to do anything - the application isn't starting and the machine is almost completely 100% idle.
As suggested in the FAQ I added "-shared-libstdc++", but that doesn't seem to be available for Clang - it's not even listed in the list of support command-line options.
Contributor guide
Research direction
Reproduce the trace with Clang 5.0.1 on Ubuntu 16.04 using the reported sanitizer flags and ASAN_OPTIONS variants. Start with the symbolization path referenced at asan_malloc_linux.cc:67:3 and determine why the allocation frame is shown as an unknown module; done means an identified cause and a documented or testable resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100