aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2022-07-17 00:45:15 -0700
committerFangrui Song <i@maskray.me>2022-07-17 00:45:15 -0700
commit36b52c38aaffa3cd1936b7992fffd0cfa6d67f7b (patch)
tree900dff02d3c83e72e65701f0a22b7956f00197e5 /llvm/lib/CodeGen/MachineFunction.cpp
parent601b3a13dea746e2b1e683bbbece41ae9de76c2b (diff)
downloadllvm-36b52c38aaffa3cd1936b7992fffd0cfa6d67f7b.zip
llvm-36b52c38aaffa3cd1936b7992fffd0cfa6d67f7b.tar.gz
llvm-36b52c38aaffa3cd1936b7992fffd0cfa6d67f7b.tar.bz2
[sanitizer] Compare against the alignment of the latter range trying to find consecutive TLS blocks in GetStaticTlsBoundary
On a mips64el-linux-gnu system, the dynamic linker arranges TLS blocks like: [0] 0xfff7fe9680..0xfff7fe9684, align = 0x4 [1] 0xfff7fe9688..0xfff7fe96a8, align = 0x8 [2] 0xfff7fe96c0..0xfff7fe9e60, align = 0x40 [3] 0xfff7fe9e60..0xfff7fe9ef8, align = 0x8 Note that the dynamic linker can only put [1] at 0xfff7fe9688, not 0xfff7fe9684 or it will be misaligned. But we were comparing the distance between two blocks with the alignment of the previous range, causing GetStaticTlsBoundary fail to merge the consecutive blocks. Compare against the alignment of the latter range to fix the issue. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D129112
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions