Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPluggable panic implementations (tracking issue for RFC 1513) #32837
Comments
nikomatsakis
added
B-RFC-approved
T-lang
B-unstable
labels
Apr 8, 2016
nikomatsakis
referenced this issue
Apr 8, 2016
Merged
RFC: Stabilize implementing panics as aborts #1513
alexcrichton
self-assigned this
Apr 8, 2016
This comment has been minimized.
This comment has been minimized.
|
I'm working on an implementation. |
This comment has been minimized.
This comment has been minimized.
mrpollo
commented
Apr 9, 2016
|
is there a branch we can track? @alexcrichton, thanks! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Will I still need a dummy |
This comment has been minimized.
This comment has been minimized.
|
@ketsuban it depends. If you use any library compiled with |
alexcrichton
referenced this issue
Apr 12, 2016
Merged
rustc: Implement custom panic runtimes #32900
This comment has been minimized.
This comment has been minimized.
|
I've opened a PR for this. |
alexcrichton
removed their assignment
Apr 12, 2016
alexcrichton
removed
the
B-RFC-approved
label
Apr 12, 2016
bors
added a commit
that referenced
this issue
Apr 14, 2016
bors
added a commit
that referenced
this issue
Apr 14, 2016
bors
added a commit
that referenced
this issue
Apr 15, 2016
bors
added a commit
that referenced
this issue
Apr 16, 2016
bors
added a commit
that referenced
this issue
Apr 16, 2016
bors
added a commit
that referenced
this issue
Apr 18, 2016
bors
added a commit
that referenced
this issue
Apr 19, 2016
bors
added a commit
that referenced
this issue
Apr 19, 2016
bors
added a commit
that referenced
this issue
Apr 19, 2016
bors
added a commit
that referenced
this issue
Apr 19, 2016
bors
added a commit
that referenced
this issue
Apr 19, 2016
bors
added a commit
that referenced
this issue
Apr 20, 2016
bors
added a commit
that referenced
this issue
May 5, 2016
bors
added a commit
that referenced
this issue
May 5, 2016
bors
added a commit
that referenced
this issue
May 6, 2016
bors
added a commit
that referenced
this issue
May 7, 2016
bors
added a commit
that referenced
this issue
May 9, 2016
bors
added a commit
that referenced
this issue
May 10, 2016
bors
closed this
in
#32900
May 10, 2016
This comment has been minimized.
This comment has been minimized.
|
Ah I should leave this open as the tracking issue |
alexcrichton
reopened this
May 10, 2016
This comment has been minimized.
This comment has been minimized.
|
The corresponding cargo option is still missing, isn't it? From the RFC:
|
This comment has been minimized.
This comment has been minimized.
|
@phil-opp indeed! I was just waiting for a new nightly but now I've got a PR for that as well |
This comment has been minimized.
This comment has been minimized.
|
cargo PR has landed. should this be closed? |
This comment has been minimized.
This comment has been minimized.
|
Nah this is sticking around as the tracking issue for panic runtimes in general. Only the |
This comment has been minimized.
This comment has been minimized.
|
Is it intentional/known that anything with |
This comment has been minimized.
This comment has been minimized.
|
@aidanhs I believe that's rust-lang/cargo#2738 |
alexcrichton
added
the
T-libs
label
Jun 21, 2016
aturon
added
the
I-nominated
label
Aug 29, 2016
nrc
added
the
B-RFC-implemented
label
Aug 29, 2016
brson
added
the
P-low
label
Aug 29, 2016
This comment has been minimized.
This comment has been minimized.
|
The only remaining thing here is the stable mechanism for plugging in new unwinders, which is not a priority. |
This comment has been minimized.
This comment has been minimized.
|
And which should probably wait for some needs-provides functionality to be implemented or avoided. |
aturon
removed
the
I-nominated
label
Sep 1, 2016
sfackler
changed the title
Panic as abort (tracking issue for RFC 1513)
Pluggable panic implementations (tracking issue for RFC 1513)
Sep 7, 2016
This comment has been minimized.
This comment has been minimized.
|
Once we have transparently rebuildable std, I'd like to remove the Cargo option from profile. The other profile options do not (to my knowledge) change ABI or semantics so it is inconsistent to put the panic strategy in there. The target spec as per #36647 is a better home for the time being. |
This comment has been minimized.
This comment has been minimized.
What would be the ideal way to pick the panic strategy then? Would it be something like this? (assuming abort is the default and you want to switch to panic=unwind):
Plus some magic attribute in |
This comment has been minimized.
This comment has been minimized.
How would that work? Leaving aside the issue that it would be a breaking change, per-profile panic strategies are useful: For unit tests you need |
This comment has been minimized.
This comment has been minimized.
|
Here are some ideas: For the low-level panic ABI stuff (abort/unwinding)I've been thinking that crates should be able to assert a cfg/scenario formula, and that this formula can be used during dependency solving. Additionally, For high-level strategies@japaric that's the basic idea, but a proper-needs provides solution should make that slicker. https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst is a proposal for Haskell that basically gives it parameterized packages. For "global/singleton" things panic strategies and log, we need to make a "needer" package for them that must be instantiated exactly 1 way in the install plan. It's a huge undertaking (Backpack is a PHD thesis), but would be the pinnacle of everything we are trying to do build-system-wise for exotic platform development. |
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 22, 2017
geofft
referenced this issue
May 27, 2018
Merged
Fixes #18 -- call the kernel's BUG macro when we panic #19
This comment has been minimized.
This comment has been minimized.
|
cc @japaric is this fully done now that |
This comment has been minimized.
This comment has been minimized.
|
@Centril That depends on whether we want to use this issue to track a stable mechanism for implementing unwinding in |
This comment has been minimized.
This comment has been minimized.
|
@japaric can you raise this on internals perhaps (and close this issue after...)? I'd like to avoid reusing tracking issues and rather keep their scope tightly delimited. |
nikomatsakis commentedApr 8, 2016
•
edited by sfackler
Tracking issue for rust-lang/rfcs#1513.
-C panic=abortis now stable, but the ability to create customized panic implementations is still unstable.