remill icon indicating copy to clipboard operation
remill copied to clipboard

Cache invalidated might fail on Mac M1/M2

Open pgarba opened this issue 3 years ago • 1 comments

The cache invalidation might fail if a new function is allocated at the same address as the cached one. This happens to me on the M2 after I delete a function and then allocate a new one which leads to return a nullptr for cached values and results in a crash.

https://github.com/lifting-bits/remill/blob/829ee4acf58742d941be5f77c941e1a98546fc2f/lib/BC/InstructionLifter.cpp#L96

pgarba avatar Nov 29 '22 05:11 pgarba

Perhaps the cache invalidation should hold a weak value handle on the llvm function.

pgoodman avatar Nov 30 '22 18:11 pgoodman