diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index a88c11d6e2c47..6a595e3a69886 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -1033,6 +1033,10 @@ void addPipeline(ModulePassManager &MPM, int opt_level, bool lower_intrinsics, b MPM.addPass(llvm::createModuleToFunctionPassAdaptor(std::move(FPM))); } } +#if defined(_COMPILER_ASAN_ENABLED_) + // Needed for both AddressSanitizerPass and ModuleAddressSanitizerPass + MPM.addPass(RequireAnalysisPass()); +#endif { FunctionPassManager FPM; #if defined(_COMPILER_ASAN_ENABLED_)