-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Implement a simple e2e test for PFP. #151655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: users/pcc/spr/main.implement-a-simple-e2e-test-for-pfp
Are you sure you want to change the base?
Implement a simple e2e test for PFP. #151655
Conversation
Created using spr 1.3.6-beta.1
You can test this locally with the following command:darker --check --diff -r origin/main...HEAD compiler-rt/test/pfp/lit.cfg.py
View the diff from darker here.--- lit.cfg.py 2025-10-10 23:12:37.000000 +0000
+++ lit.cfg.py 2025-10-10 23:14:24.263104 +0000
@@ -20,11 +20,13 @@
"-fexperimental-pointer-field-protection -fexperimental-pointer-field-protection-tagged"
]
clang_pfp_cxxflags = config.cxx_mode_flags + clang_pfp_tagged_common_cflags
-clang_pfp_cxxflags = clang_pfp_cxxflags + ["-fuse-ld=lld --rtlib=compiler-rt --unwindlib=libunwind -static-libgcc"]
+clang_pfp_cxxflags = clang_pfp_cxxflags + [
+ "-fuse-ld=lld --rtlib=compiler-rt --unwindlib=libunwind -static-libgcc"
+]
def build_invocation(compile_flags, with_lto=False):
lto_flags = []
if with_lto and config.lto_supported:
@@ -32,6 +34,8 @@
return " " + " ".join([config.clang] + lto_flags + compile_flags) + " "
config.substitutions.append(("%clangxx ", build_invocation(clang_cxxflags)))
-config.substitutions.append(("%clangxx_pfp ", build_invocation(clang_pfp_cxxflags, config.use_thinlto)))
+config.substitutions.append(
+ ("%clangxx_pfp ", build_invocation(clang_pfp_cxxflags, config.use_thinlto))
+)
|
|
Change originally by @qinkunbao |
Pull Request: llvm#151655
You can test this locally with the following command:git-clang-format --diff origin/main HEAD --extensions h,cpp -- compiler-rt/test/pfp/use-after-free-fixed.cpp compiler-rt/test/pfp/use-after-free.cpp compiler-rt/test/pfp/utils.h
View the diff from clang-format here.diff --git a/compiler-rt/test/pfp/utils.h b/compiler-rt/test/pfp/utils.h
index 0e8a6e935..d1b32a3f0 100644
--- a/compiler-rt/test/pfp/utils.h
+++ b/compiler-rt/test/pfp/utils.h
@@ -64,4 +64,3 @@ static void crash_if_crash_tests_unsupported() {
__builtin_trap();
#endif
}
-
|
No description provided.