DynamoRIO / DynamoRIO/drmemory

wrap_malloc test fails on linux

Open
#1,740 9 comments 0 reactions 0 assignees View on GitHub
Bug-FalsePositive Component-Tests OpSys-Linux
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

The `wrap_malloc` test expects 1 unique unaddressable access with 20 instances, but on my goobuntu with glibc 2.19 it finds 51 additional unique unaddressable accesses with 1 instance each. All of the additional accesses are over-reads by 4 bytes in a region that does not appear to have any redzone (if it had been over-written, wouldn't there be a corresponding error reported?)

```
Error #1: UNADDRESSABLE ACCESS beyond heap bounds: writing 0xf75e78fc-0xf75e7900 4 byte(s)
#0 replace_memset [/usr/local/google/home/byronh/work/dr1/drmemory/drmemory/replace.c:196] (0x739f1059 ) modid:2
#1 ld-linux.so.2!__GI__dl_allocate_tls_init [/build/buildd/eglibc-2.19/elf/dl-tls.c:436] (0xf77e977b ) modid:4
#2 ld-linux.so.2!dl_main [/build/buildd/eglibc-2.19/elf/rtld.c:2230] (0xf77db44b ) modid:4
#3 ld-linux.so.2!_dl_start [/build/buildd/eglibc-2.19/elf/rtld.c:332] (0xf77dca0b ) modid:4
#4 ld-linux.so.2!_start [/build/buildd/eglibc-2.19/elf/rtld.c:875] (0xf77d90d7 ) modid:4
Note: @0:00:01.544 in thread 132767
Note: next higher malloc: 0xf75e7e10-0xf75e7e98
Note: prev lower malloc: 0xf75e7010-0xf75e7218
Note: instruction: mov %eax -> (%esi)
error end

Error #2: UNADDRESSABLE ACCESS beyond heap bounds: reading 0xf75e7940-0xf75e7944 4 byte(s)
#0 libc.so.6!__GI___ctype_init [/build/buildd/eglibc-2.19/ctype/ctype-info.c:31] (0xf69c9e51 ) modid:5
#1 ld-linux.so.2!call_init.part.0 [/build/buildd/eglibc-2.19/elf/dl-init.c:64] (0xf77e6d37 ) modid:4
#2 ld-linux.so.2!_dl_init_internal [/build/buildd/eglibc-2.19/elf/dl-init.c:36] (0xf77e6e64 ) modid:4
#3 ld-linux.so.2!_dl_start_user [/build/buildd/eglibc-2.19/elf/rtld.c:875] (0xf77d910f ) modid:4
Note: @0:00:01.602 in thread 132767
Note: next higher malloc: 0xf75e7e10-0xf75e7e98
Note: prev lower malloc: 0xf75e7010-0xf75e7218
Note: instruction: mov %gs:0x00 -> %eax
error end

Error #7: UNADDRESSABLE ACCESS beyond heap bounds: reading 0xf75e794c-0xf75e7950 4 byte(s)
#0 libc.so.6!__new_exitfn [/build/buildd/eglibc-2.19/stdlib/cxa_atexit.c:79] (0xf69d5279 ) modid:5
#1 libc.so.6!__cxa_atexit_internal [/build/buildd/eglibc-2.19/stdlib/cxa_atexit.c:35] (0xf69d542d ) modid:5
#2 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.19/csu/libc-start.c:220] (0xf69bb9e8 ) modid:5
#3 malloc!? (0x08048701 ) modid:1
Note: @0:00:01.670 in thread 132767
Note: next higher malloc: 0xf75e7e10-0xf75e7e98
Note: prev lower malloc: 0xf75e7010-0xf75e7218
Note: instruction: cmp %gs:0x0c $0x00000000
error end
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.