[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

Anton Korobeynikov via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 22:44:19 PDT 2024


================
@@ -333,7 +338,8 @@ void CodeGenFunction::registerGlobalDtorWithLLVM(const VarDecl &VD,
                                                  llvm::FunctionCallee Dtor,
                                                  llvm::Constant *Addr) {
   // Create a function which calls the destructor.
-  llvm::Function *dtorStub = createAtExitStub(VD, Dtor, Addr);
+  llvm::Function *dtorStub =
----------------
asl wrote:

So, `createAtExitStub` might return ptrauth constant expression. And the `cast<Function>` here does not fail simply because we do not sign these pointers (yet)?

https://github.com/llvm/llvm-project/pull/98276


More information about the cfe-commits mailing list