DynamoRIO / DynamoRIO/dynamorio
CRASH in heap_vmareas_synch_units with client using dr_raw_mremap
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
A client using dr_raw_mremap extensively has hit a crash in heap_vmareas_synch_units several times now. Perhaps the remaps are not being handled properly and are messing up the stale units list or sthg?
It happens on a large app and is not easy to debug.
```
#6 0x0000000004d3f129 dynamo_vm_areas_start_reading
#7 0x0000000004d3f6b4 dynamo_vm_area_overlap
#8 0x0000000004d20a19 memcache_query_memory
#9 0x0000000004d28029 dr_raw_mremap
```
There is a frame above that where the crash is:
```
0x0000000004d3f125 <+69>: callq 0x4cd4a00
(gdb) x/4i 0x4cd4b20
0x4cd4b20 : mov 0x18(%r15),%r12
0x4cd4b24 : callq 0x4d2def0
```
I think the 0x18 is u->reserved_end_pc:
```
for (u = heapmgt->heap.dead; u != NULL; u = next) {
<...>
app_pc end_align = (app_pc) ALIGN_FORWARD(UNIT_RESERVED_END(u), PAGE_SIZE);
```
So some unit on the dead list is de-allocated?
Xref #2329?
Contributor guide
Assessment
This issue has not been assessed yet.