DynamoRIO / DynamoRIO/drmemory
padded size heuristics
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [zhao...@google.com](https://code.google.com/u/106321947286816917100/) on February 16, 2012 11:43:30_
When options.get_padded_size is false or no get_padded_size function, DrM uses the heuristics ALIGN_FORWARD(real_size, 8).
In pattern mode, this cause several tests on Linux crash, which run fine if using ALIGN_FORWARD(real_size, 4).
Need investigate why 8-byte alignment assumption causing the problem.
Should we change it to ALIGN_FORWARD(real_size, 4) instead?
some note:
The 4 bytes at the end are the Doug Lea footer field which is only used if the chunk is free, so it should be safe to clobber it for a live malloc (not for a free one). seems like malloc_usable_size() should include it.
All bets are off if using some other allocator of course.
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=787_
Contributor guide
Assessment
This issue has not been assessed yet.