Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted
check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end check which inserts traps). Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce useful diagnostics and has false positives (PR17635), and is not a good compromise position between UBSan's checks and ASan's checks. Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical behavior for that flag. llvm-svn: 193205
This commit is contained in:
@@ -245,7 +245,7 @@ void EmitAssemblyHelper::CreatePasses(TargetMachine *TM) {
|
||||
addObjCARCOptPass);
|
||||
}
|
||||
|
||||
if (LangOpts.Sanitize.Bounds) {
|
||||
if (LangOpts.Sanitize.LocalBounds) {
|
||||
PMBuilder.addExtension(PassManagerBuilder::EP_ScalarOptimizerLate,
|
||||
addBoundsCheckingPass);
|
||||
PMBuilder.addExtension(PassManagerBuilder::EP_EnabledOnOptLevel0,
|
||||
|
||||
Reference in New Issue
Block a user