Skip to content

Conversation

@bgergely0
Copy link
Contributor

@bgergely0 bgergely0 commented Dec 9, 2025

The test case build a binary from C++, and checks for the number of
functions the PointerAuthCFIFixup pass runs on.
This can change based on the platform. To account for this, the patch
changes the number to a regex.

The test failed when running on RHEL 9.

@bgergely0 bgergely0 marked this pull request as ready for review December 9, 2025 10:53
@llvmbot llvmbot added the BOLT label Dec 9, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 9, 2025

@llvm/pr-subscribers-bolt

Author: Gergely Bálint (bgergely0)

Changes

The test case build a binary from C++, and checks for the number of
functions the PointerAuthCFIFixup pass runs on.
This can change based on the platform. To account for this, the patch
changes the number to a regex.


Full diff: https://github.com/llvm/llvm-project/pull/171395.diff

1 Files Affected:

  • (modified) bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp (+5-4)
diff --git a/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp b/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp
index 1bfeeaed3715a..168a8d20fb007 100644
--- a/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp
+++ b/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp
@@ -11,10 +11,11 @@
 // RUN: -fno-asynchronous-unwind-tables \
 // RUN: %s -o %t.exe -Wl,-q
 // RUN: llvm-bolt %t.exe -o %t.bolt | FileCheck %s --check-prefix=CHECK
-//
-// CHECK: PointerAuthCFIAnalyzer ran on 3 functions. Ignored
-// CHECK-NOT: 0 functions (0.00%) because of CFI inconsistencies
-// CHECK-SAME: 1 functions (33.33%) because of CFI inconsistencies
+
+// Number of functions with .cfi-negate-ra-state in the binary is
+// platform-dependent.
+// CHECK: PointerAuthCFIAnalyzer ran on {{[0-9]}} functions.
+// CHECK: Ignored 1 functions ({{[0-9.]+}}%) because of CFI inconsistencies
 // CHECK-NEXT: BOLT-WARNING: PointerAuthCFIAnalyzer only supports asynchronous
 // CHECK-SAME: unwind tables. For C compilers, see -fasynchronous-unwind-tables.
 

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Member

@paschalis-mpeis paschalis-mpeis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the test.

The warning emission could be affected, but it should be relatively safe.
In any case, there's comment noting it's platform dependent.

nit: in your merge message you could note which distro it affected.
Was it RHEL 9?

Please also deal with the formatting issue.

The test case build a binary from C++, and checks for the number of
functions the PointerAuthCFIFixup pass runs on.
This can change based on the platform. To account for this, the patch
changes the number to a regex.
@bgergely0 bgergely0 force-pushed the users/bgergely0/fix-pacret-sync-test branch from 28dff17 to 1007280 Compare December 9, 2025 15:28
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@bgergely0 bgergely0 merged commit 51d928f into main Dec 9, 2025
10 checks passed
@bgergely0 bgergely0 deleted the users/bgergely0/fix-pacret-sync-test branch December 9, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants