================
@@ -368,7 +368,8 @@ CodeGenModule::CodeGenModule(ASTContext &C,
   IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth());
   IntPtrTy = llvm::IntegerType::get(LLVMContext,
     C.getTargetInfo().getMaxPointerWidth());
-  Int8PtrTy = llvm::PointerType::get(LLVMContext, 0);
+  Int8PtrTy = llvm::PointerType::get(LLVMContext,
----------------
AlexVlx wrote:

This seems to be an error on ASAN's side, it's relying on non-guaranteed 
behaviour and linking BC emanating from different languages with different AS 
maps. To wit, 0 is private for OCL, so having `llvm.used` and 
`llvm.compiler.used` be global arrays of pointers to private is somewhat 
suspect. I will / should fix `emitUsed` to rely on GlobalsInt8PtrTy, which 
seems like the right thing to do anyway, but whilst that'll make ASAN "work", 
it doesn't make ASAN correct, IMHO.

https://github.com/llvm/llvm-project/pull/88182
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to