[llvm-branch-commits] [clang] [clang] [sanitizer] add pseudofunction to indicate array-bounds check (PR #128977)
Florian Mayer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 5 11:44:57 PST 2025
fmayer wrote:
> @fmayer The usual approach for indicating instrumentation in Clang is to use opt-remarks. This is the approach we use for `-fbounds-safety`.
>
> In `-fbounds-safety` we embed "trap reasons" in debug info so that debuggers and symbolication tools can better understand the reason for trapping.
>
> What's the reason for using debug info, instead of opt-remarks here?
The commit description is maybe not very clear. This is not for _compiile time_ as opt remarks, but for run time. By doing this, we can
1) (more importantly) use profilers to estimate how many cycles we spend on these checks (subject to caveats),
2) more easily see why we crashed.
https://github.com/llvm/llvm-project/pull/128977
More information about the llvm-branch-commits
mailing list