aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2021-12-07 20:56:28 -0800
committerTaewook Oh <twoh@fb.com>2021-12-08 14:48:38 -0800
commit04e79cf70b42ad477bb4eaf0483a599797c600f4 (patch)
tree3c5452512b9ffe513448b6e83d99e26849a4986c /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent23149d522b92cf7525e3415c2c184ca6ecfbc1a1 (diff)
downloadllvm-04e79cf70b42ad477bb4eaf0483a599797c600f4.zip
llvm-04e79cf70b42ad477bb4eaf0483a599797c600f4.tar.gz
llvm-04e79cf70b42ad477bb4eaf0483a599797c600f4.tar.bz2
[dfsan] Add a flag to ignore personality routines.
This diff adds "dfsan-ignore-personality-routine" flag, which makes the dfsan pass to not to generate wrappers for the personality functions if the function is marked uninstrumented. This flag is to support dfsan with the cases where the exception handling routines cannot be instrumented (e.g. use the prebuilt version of c++ standard library). When the personality function cannot be instrumented it is supposed to be marked "uninstrumented" from the abi list file. While DFSan generates a wrapper function for uninstrumented functions, it cannot cannot generate a valid wrapper for vararg functions, and indirect invocation of vararg function wrapper terminates the execution of dfsan-instrumented programs. This makes invocation of personality routine to crash the program, because 1) clang adds a declaration of personality functions as a vararg function with no fixed argument, and 2) personality routines are always called indirectly. To address this issue, the flag introduced in this diff makes dfsan to not to instrument the personality function. This is not the "correct" solution in the sense that return value label from the personality function will be undefined. However, in practice, if the exception handling routines are uninstrumented we wouldn't expect precise label propagation around them, and it would be more beneficial to make the rest of the program run without termination. Reviewed By: browneee Differential Revision: https://reviews.llvm.org/D115317
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions