-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Tracking Issue for panic_backtrace_config #93346
Copy link
Copy link
Open
Labels
A-backtraceArea: BacktracesArea: BacktracesC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-backtraceArea: BacktracesArea: BacktracesC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Feature gate:
#![feature(panic_backtrace_config)]This is a tracking issue for configuring the capture and display of backtraces in the default panic hook, as well as exposing that configuration to third-party libraries for usage.
Public API
This API is intended to form part of the strategy for addressing the unsoundness of the
std::env::set_varAPI on some platforms (mostly non-Windows). See #92431 (comment) for a summary.Steps / History
Unresolved Questions
std::backtrace?std::panic::prefix necessary to use these APIs, probably adding a second module to the mix isn't worth it.get_backtrace_stylebe exposed?Option<BacktraceStyle>return type looks a little weird, and may not mean the intuitive thing --NonerepresentsUnsupported, not "not set" or "don't print backtraces", as might be initially assumed.std::panic::report_backtrace(&mut dyn Write)instead which internally knows how to format things.