DynamoRIO / DynamoRIO/drmemory
wrap_wincrt test fails in all Windows builds
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
The first intended error does not occur in `wincrt.cpp` for any of the Windows builds. The erroneous statement over-reads the 8-byte allocation `foo` by 40 bytes. The log shows that a second allocation occupies the region accessed by the (undetected) over-read:
```
MALLOC 0x004e2228-0x004e22ec
MALLOC 0x004e2208-0x004e2210
```
The app's allocation at `0x004e2208` has the normal type `MALLOC_ALLOCATOR_NEW` for an app allocation. The allocation at `0x004e2228` has type `MALLOC_ALLOCATOR_UNKNOWN` occurs via `malloc_interface_t.malloc_add` on this call stack:
```
drmemorylib!heap_iter_chunk+0x20
drmemorylib!walk_individual_heap+0x13d5
drmemorylib!heap_iterator+0x9c2
drmemorylib!heap_walk+0x1f
drmemorylib!set_initial_layout+0x2c
drmemorylib!instru_event_bb_app2app+0x62
drmemorylib!drmgr_bb_event+0x164
dynamorio!instrument_basic_block+0x2ad
dynamorio!client_process_bb+0xf5
dynamorio!build_bb_ilist+0x4a9a
dynamorio!build_basic_block_fragment+0x34f
dynamorio!dispatch+0x8a2
dynamorio!call_switch_stack+0x23
```
The first error (which is missing) should be:
```
Error #1: UNADDRESSABLE ACCESS beyond heap bounds: reading 0x004e2238-0x004e2239 1 byte(s)
```
Logs and test results can be found on my website: http://www.hawkinssoftware.net/drmemory/i1741/
Contributor guide
Assessment
This issue has not been assessed yet.