[compiler-rt] [HWASan] symbolize stack overflows (PR #95308)
Evgenii Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 14:28:42 PDT 2024
================
@@ -336,16 +368,18 @@ class Symbolizer:
size = local[4]
if frame_offset is None or size is None:
continue
- obj_offset = (self.__last_access_address - fp - frame_offset) & fp_mask
- if obj_offset >= size:
- continue
+ obj_offset = (self.__last_access_address & fp_mask) - ((fp + frame_offset) & fp_mask)
----------------
eugenis wrote:
why? this is very biased towards overflow and against underflow. I.e., with fp_mask of 1Mb, access at (1Mb - 8 bytes) and the object offset of 8 bytes this code will come up with obj_offset of (1Mb - 16) instead of (-8).
https://github.com/llvm/llvm-project/pull/95308
More information about the llvm-commits
mailing list