diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 94dce9f46fb..baeb17ed1cb 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -893,7 +893,7 @@ LLVMRustOptimizeWithNewPassManager( AddressSanitizerOptions opts = AddressSanitizerOptions{ /*CompileKernel=*/false, SanitizerOptions->SanitizeAddressRecover, - /*UseAfterScope=*/false, + /*UseAfterScope=*/true, AsanDetectStackUseAfterReturnMode::Runtime, }; MPM.addPass(ModuleAddressSanitizerPass(opts));