[all-commits] [llvm/llvm-project] e1c36b: Fix KCFI types for generated functions with intege...
Sami Tolvanen via All-commits
all-commits at lists.llvm.org
Tue Aug 20 16:51:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e1c36bde0551977d4b2efae032af6dfc4b2b3936
https://github.com/llvm/llvm-project/commit/e1c36bde0551977d4b2efae032af6dfc4b2b3936
Author: Sami Tolvanen <samitolvanen at users.noreply.github.com>
Date: 2024-08-20 (Tue, 20 Aug 2024)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/test/CodeGen/kcfi-normalize.c
M llvm/lib/Transforms/Utils/ModuleUtils.cpp
A llvm/test/Transforms/GCOVProfiling/kcfi-normalize.ll
M llvm/test/Transforms/GCOVProfiling/kcfi.ll
Log Message:
-----------
Fix KCFI types for generated functions with integer normalization (#104826)
With -fsanitize-cfi-icall-experimental-normalize-integers, Clang
appends ".normalized" to KCFI types in CodeGenModule::CreateKCFITypeId,
which changes type hashes also for functions that don't have integer
types in their signatures. However, llvm::setKCFIType does not take
integer normalization into account, which means LLVM generated
functions with KCFI types, e.g. sanitizer constructors, will fail KCFI
checks when integer normalization is enabled in Clang.
Add a cfi-normalize-integers module flag to indicate integer
normalization is used, and append ".normalized" to KCFI types also in
llvm::setKCFIType to fix the type mismatch.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list