Skip to content

cleanup: Revert all hacks added in #39234 to avoid feeding untrusted data to libbacktrace #77622

Closed
@petrochenkov

Description

@petrochenkov

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.O-windows-gnuToolchain: GNU, Operating system: WindowsT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions