cleanup: Revert all hacks added in #39234 to avoid feeding untrusted data to libbacktrace #77622
Labels
A-runtime
Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
O-windows-gnu
Toolchain: GNU, Operating system: Windows
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
#39234 is the PR that provided libbacktrace with the name of the current executable when libbacktrace was used for generating backtraces in the standard library.
libbacktrace had a history of crashes and buffer overruns, so #39234 had to apply some logic to ensure that the passed executable is right and doesn't get replaced or go away while the current process is running, all to avoid passing untrusted data to libbacktrace.
Now we use gimli instead of libbacktrace, and gimli is more reliable, and we can feed untrusted data to it.
In the worst case the backtrace will be incorrect or absent as a result.
So all hacks that were introduced #39234 and weren't removed in #74682 can be removed now.
The text was updated successfully, but these errors were encountered: