std: Avoid panics in rust_eh_personality#42487
Merged
bors merged 1 commit intorust-lang:masterfrom Jun 8, 2017
Merged
Conversation
Contributor
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Member
Author
|
r? @vadimcn |
Contributor
|
Looks good! @bors: r+ |
Collaborator
|
📌 Commit 28682bc has been approved by |
Collaborator
|
⌛ Testing commit 28682bc with merge 4946653... |
Collaborator
|
💔 Test failed - status-appveyor |
Member
|
x86_64-pc-windows-gnu build failure. error[E0308]: mismatched types
--> src\libpanic_unwind\seh64_gnu.rs:131:9
|
131 | EHAction::None => None,
| ^^^^^^^^^^^^^^ expected enum `core::result::Result`, found enum `dwarf::eh::EHAction`
|
= note: expected type `core::result::Result<dwarf::eh::EHAction, ()>`
found type `dwarf::eh::EHAction` |
This commit removes a few calls to panic and/or assert in `rust_eh_personality`.
This function definitely can't itself panic (that'd probably segfault or do
something else weird) and I was also noticing that a `pub extern fn foo() {}`
cdylib was abnormally large. Turns out all that size was the panicking machinery
brought in by the personality function!
The change here is to return a `Result` internally so we can bubble up the fatal
error, eventually translating to the appropriate error code for the libunwind
ABI.
28682bc to
52805d2
Compare
Member
Author
|
@bors: r=vadimcn |
Collaborator
|
📌 Commit 52805d2 has been approved by |
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Jun 8, 2017
…=vadimcn
std: Avoid panics in rust_eh_personality
This commit removes a few calls to panic and/or assert in `rust_eh_personality`.
This function definitely can't itself panic (that'd probably segfault or do
something else weird) and I was also noticing that a `pub extern fn foo() {}`
cdylib was abnormally large. Turns out all that size was the panicking machinery
brought in by the personality function!
The change here is to return a `Result` internally so we can bubble up the fatal
error, eventually translating to the appropriate error code for the libunwind
ABI.
Collaborator
bors
added a commit
that referenced
this pull request
Jun 8, 2017
std: Avoid panics in rust_eh_personality
This commit removes a few calls to panic and/or assert in `rust_eh_personality`.
This function definitely can't itself panic (that'd probably segfault or do
something else weird) and I was also noticing that a `pub extern fn foo() {}`
cdylib was abnormally large. Turns out all that size was the panicking machinery
brought in by the personality function!
The change here is to return a `Result` internally so we can bubble up the fatal
error, eventually translating to the appropriate error code for the libunwind
ABI.
Collaborator
|
☀️ Test successful - status-appveyor, status-travis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit removes a few calls to panic and/or assert in
rust_eh_personality.This function definitely can't itself panic (that'd probably segfault or do
something else weird) and I was also noticing that a
pub extern fn foo() {}cdylib was abnormally large. Turns out all that size was the panicking machinery
brought in by the personality function!
The change here is to return a
Resultinternally so we can bubble up the fatalerror, eventually translating to the appropriate error code for the libunwind
ABI.