Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stackwalker calculation of object displacement for Offheap
In walkJITFrameSlotsForInternalPointers(), a displacement of data is calculated between an array object before and after it is moved. Currently, when offheap is enabled, this displacement is calculated as the difference between the dataAddr pointers of the new and old locations. However, because the src object may be overwritten during sliding object movement, it is not safe to read its contents, such as the dataAddr pointer. Thus, this contribution modifies how the stackwalker calculates displacement when offheap allocation is enabled such that: - if the array data is adjacent to the array header (i.e.: dataAddr == pinningArrayAddr + sizeofHeader), calculate the displacement as dst - src - otherwise, set displacement to 0 Signed-off-by: midronij <[email protected]>
- Loading branch information