[llvm-branch-commits] [llvm] [BOLT][PAC] Warn about synchronous unwind tables (PR #165227)
Gergely Bálint via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 29 01:44:55 PDT 2025
================
@@ -133,11 +140,17 @@ Error PointerAuthCFIAnalyzer::runOnFunctions(BinaryContext &BC) {
ParallelUtilities::runOnEachFunction(
BC, ParallelUtilities::SchedulingPolicy::SP_INST_LINEAR, WorkFun,
SkipPredicate, "PointerAuthCFIAnalyzer");
+
+ float IgnoredPercent = (100.0 * FunctionsIgnored) / Total;
BC.outs() << "BOLT-INFO: PointerAuthCFIAnalyzer ran on " << Total
<< " functions. Ignored " << FunctionsIgnored << " functions "
- << format("(%.2lf%%)", (100.0 * FunctionsIgnored) / Total)
+ << format("(%.2lf%%)", IgnoredPercent)
<< " because of CFI inconsistencies\n";
+ if (IgnoredPercent >= 10.0)
+ BC.outs() << "BOLT-WARNING: PointerAuthCFIAnalyzer only supports "
+ "asynchronous unwind tables.\n";
----------------
bgergely0 wrote:
I'm not a fan of adding exact flag names for two reasons:
- it's only valid for C/C++, whereas the ABI is "general" and other languages (Rust) also generate such unwind tables, but the flags are named differently
- `-fasync` is the default for clang, so if we have a sync unw table, it's because the `-fno-async` flag was passed. If the user then passes `-fasync` as well, the chosen option depends on the order of the two flags
WDYT?
https://github.com/llvm/llvm-project/pull/165227
More information about the llvm-branch-commits
mailing list