-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Win64 eh_personality natively. #27210
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
I am not quite happy about the way |
☔ The latest upstream changes (presumably #27176) made this pull request unmergeable. Please resolve the merge conflicts. |
[libstd implementation](../std/rt/unwind/index.html) for more | ||
The second and third of these functions, `eh_personality` and `rust_eh_unwind_resume`, | ||
are used by the failure mechanisms of the compiler. These are often mapped to GCC's | ||
personality function and libgcc's `_Unwind_Resume` respectively |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wording of this sentence somehow seems to suggest GCC personality function and _Unwind_Resume
come from two different locations, while in practice they both come from libgcc
.
Nice work @vadimcn! |
// [24:27] = type | ||
// [0:23] = magic | ||
const ETYPE: DWORD = 0b1110_u32 << 28; | ||
const MAGIC: DWORD = 0x525354; // "RST" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RST
also refers to reStructuredText
. How about we use .rs
here?
const MAGIC: DWORD = 0x2e7273; // ".rs"
Epic patch. |
502a189
to
59d5b19
Compare
Addressed comments and rebased on top of master. r? |
pub mod imp; | ||
#[cfg(not(target_env = "msvc"))] #[path = "gcc.rs"] #[doc(hidden)] | ||
|
||
// x86-pc-windows-gnu and all others |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/x86/i686/
Works now. r? |
@bors: r+ |
📌 Commit e493027 has been approved by |
⌛ Testing commit e493027 with merge 2c60a05... |
💔 Test failed - auto-linux-64-x-android-t |
Seems legit:
On Sun, Aug 2, 2015 at 12:08 PM, bors notifications@github.com wrote:
|
Fixed. Let's try again? |
@bors: r+ 96d1db2 |
⌛ Testing commit 96d1db2 with merge d99b3c5... |
💔 Test failed - auto-mac-64-opt |
@bors: retry On Mon, Aug 3, 2015 at 10:37 AM, bors notifications@github.com wrote:
|
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
⌛ Testing commit 96d1db2 with merge ceded6a... |
🎊 |
This commit leverages the runtime support for DWARF exception info added in rust-lang#27210 to enable unwinding by default on 64-bit MSVC. This also additionally adds a few minor fixes here and there in the test harness and such to get `make check` entirely passing on 64-bit MSVC: * The invocation of `maketest.py` now works with spaces/quotes in CC * debuginfo tests are disabled on MSVC * A link error for librustc was hacked around (see rust-lang#27438)
This commit leverages the runtime support for DWARF exception info added in rust-lang#27210 to enable unwinding by default on 64-bit MSVC. This also additionally adds a few minor fixes here and there in the test harness and such to get `make check` entirely passing on 64-bit MSVC: * The invocation of `maketest.py` now works with spaces/quotes in CC * debuginfo tests are disabled on MSVC * A link error for librustc was hacked around (see rust-lang#27438)
After this change, the only remaining symbol we are pulling from libgcc on Win64 is
__chkstk_ms
- the stack probing routine.