[all-commits] [llvm/llvm-project] 5301f4: [Sanitizer] Use % patterns in report paths (#141820)
Ellis Hoag via All-commits
all-commits at lists.llvm.org
Fri May 30 07:58:12 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5301f4c469de1cd410dbc2fc953ead14296d4eb0
https://github.com/llvm/llvm-project/commit/5301f4c469de1cd410dbc2fc953ead14296d4eb0
Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
Date: 2025-05-30 (Fri, 30 May 2025)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_file.cpp
A compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_fail.cpp
M compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_path_test.cpp
Log Message:
-----------
[Sanitizer] Use % patterns in report paths (#141820)
Support `%` patterns in sanitizer report paths, similar to the patterns
supported in IRPGO
https://github.com/llvm/llvm-project/blob/4bf67cdf026478c4bc3e708153c02f82e2c22524/compiler-rt/lib/profile/InstrProfilingFile.c#L999-L1017
* `%%` becomes `%`
* `%H` expands to the environment variable `HOME`
* `%t` expands to the environment variable `TMPDIR`
* `%p` expands to the process ID (PID)
In particular, the `%H` pattern is useful to resolve the home directory
at runtime, which is not possible before this PR.
Also, avoid using `Report()` before the report path has been set.
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