aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorBlue Gaston <bgaston2@apple.com>2022-12-08 12:02:14 -0800
committerBlue Gaston <bgaston2@apple.com>2022-12-12 20:32:30 -0800
commitc6e83ddb37aff90b3fff2deb8605bc0adc54b393 (patch)
tree584d7a169cf4a2ede2c799b412ebb5a571daa8dd /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parenta19ae77d2a9016428fee7cd5af03fd20ad6d4464 (diff)
downloadllvm-c6e83ddb37aff90b3fff2deb8605bc0adc54b393.zip
llvm-c6e83ddb37aff90b3fff2deb8605bc0adc54b393.tar.gz
llvm-c6e83ddb37aff90b3fff2deb8605bc0adc54b393.tar.bz2
[Sanitizers][CFG][arm64e] Fix test because -fsanitize-coverage=control-flow does not sign BB entry
-fsanitize-coverage=control-flow does not sign entries into basic blocks on arm64e. This test compares a local pointer to a function [signed] with the basic block pointer. Because the entry into the basic block is unsigned the addresses being compared are signed and unsigned, causing the path never to be taken. This is a "bandaid" to get this test passing. We strip the signed bits from the pointer to the local functions so that the comparisons pass. Filed radar: rdar://103042879 to note the behavior. context: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp#L1068 // blockaddress can not be used on function's entry block. if (&BB == &F.getEntryBlock()) CFs.push_back((Constant *)IRB.CreatePointerCast(&F, IntptrPtrTy)); else CFs.push_back((Constant *)IRB.CreatePointerCast(BlockAddress::get(&BB), IntptrPtrTy)); BlockAddress::get is responsible for signing the pointer. Because of: https://reviews.llvm.org/D133157 rdar://103042879 Differential Revision: https://reviews.llvm.org/D139661
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
0 files changed, 0 insertions, 0 deletions