DynamoRIO / DynamoRIO/drmemory
malloc.c change results in missing leaks in several tests
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
The #1015 commit 3bfff2 caused a lot of malloc.c-based tests to fail on my machine, but only w/ drmem release build:
```
drmemory-rel-32: 108 tests passed, **** 5 tests failed: ****
malloc => stderr failed to match ~~Dr\.M~~ 3 unique, 3 total, 155 byte\(s\) of
leak\(s\), found ~~Dr.M~~ 2 unique, 2 total, 123 byte(s) of leak(s)
instead
leaks-only => stderr failed to match ~~Dr\.M~~ 3 unique, 3 total, 155 byte\(s\) of
leak\(s\), found ~~Dr.M~~ 2 unique, 2 total, 123 byte(s) of leak(s)
instead
nosymcache => stderr failed to match ~~Dr\.M~~ 3 unique, 3 total, 155 byte\(s\) of
leak\(s\), found ~~Dr.M~~ 2 unique, 2 total, 123 byte(s) of leak(s)
instead
redzone8 => stderr failed to match ~~Dr\.M~~ 3 unique, 3 total, 155 byte\(s\) of
leak\(s\), found ~~Dr.M~~ 2 unique, 2 total, 123 byte(s) of leak(s)
instead
mallocMD => stderr failed to match ~~Dr\.M~~ 3 unique, 3 total, 155 byte\(s\) of
leak\(s\), found ~~Dr.M~~ 2 unique, 2 total, 123 byte(s) of leak(s)
instead
```
This leak is missing:
```
Error #12: LEAK 16 direct bytes 0x01116f50-0x01116f60 + 16 indirect bytes
#0 replace_malloc (0x73833450 )
d:\derek\drmemory\git\src\common\alloc_replace.c:2384
#1 main (0x001415c3 )
d:\derek\drmemory\git\src\tests\malloc.c:277
```
-leaks_only does not reproduce as easily: b/c of -zero_stack?
-leaks_only -no_zero_stack => repro
Debug drmem on release malloc.exe => no repro
Release drmem on debug malloc.exe => repro!
Rather strange. I would have said it's just some weird thing w/ a value in the setjmp buffer or sthg but why does it depend on drmem being release build?
In any case if we don't have time to track it down now (on the bots this doesn't seem to happen) I may put in a workaround of moving that setjmp code.
Contributor guide
Assessment
This issue has not been assessed yet.