Skip to content

Implement Win64 eh_personality natively. - #27210

Merged
bors merged 3 commits into
rust-lang:masterfrom
vadimcn:win64-eh-pers
Aug 3, 2015
Merged

Implement Win64 eh_personality natively.#27210
bors merged 3 commits into
rust-lang:masterfrom
vadimcn:win64-eh-pers

Conversation

@vadimcn

Copy link
Copy Markdown
Contributor

After this change, the only remaining symbol we are pulling from libgcc on Win64 is __chkstk_ms - the stack probing routine.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@vadimcn

Copy link
Copy Markdown
ContributorAuthor

I am not quite happy about the way rust_eh_unwind_resume get linked. It should have probably been a lang item, but I couldn't quite figure out how to plumb it through to LLVMRustHookUnwindResume...

@vadimcn

Copy link
Copy Markdown
ContributorAuthor

r? @alexcrichton

@bors

bors commented Jul 22, 2015

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #27176) made this pull request unmergeable. Please resolve the merge conflicts.

Comment threadsrc/doc/trpl/no-stdlib.md Outdated

Copy link
Copy Markdown
Member

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.

@alexcrichton

Copy link
Copy Markdown
Member

Nice work @vadimcn!

Copy link
Copy Markdown
Contributor

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"

@brsonbrson added the relnotes Marks issues that should be documented in the release notes of the next release. label Jul 23, 2015
@brson

Copy link
Copy Markdown
Contributor

Epic patch.

@vadimcn
vadimcnforce-pushed the win64-eh-pers branch 2 times, most recently from 502a189 to 59d5b19CompareJuly 24, 2015 09:28
@vadimcn

Copy link
Copy Markdown
ContributorAuthor

Addressed comments and rebased on top of master. r?

Comment threadsrc/libstd/rt/unwind/mod.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/x86/i686/

@vadimcn

Copy link
Copy Markdown
ContributorAuthor

Works now. r?

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Aug 2, 2015

Copy link
Copy Markdown
Collaborator

📌 Commit e493027 has been approved by alexcrichton

@bors

bors commented Aug 2, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e493027 with merge 2c60a05...

@bors

bors commented Aug 2, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-linux-64-x-android-t

@Gankra

Copy link
Copy Markdown
Contributor

Seems legit:


../src/libstd/rt/unwind/gcc.rs:231:38: 231:43 error: use of moved
value: `state` [E0382]
../src/libstd/rt/unwind/gcc.rs:231
__gcc_personality_v0(state, ue_header, context)
^~~~~
../src/libstd/rt/unwind/gcc.rs:225:13: 225:18 note: `state` moved here
because it has type `rt::libunwind::_Unwind_State`, which is
non-copyable
../src/libstd/rt/unwind/gcc.rs:225 if (state as c_int &
uw::_US_ACTION_MASK as c_int)
^~~~~
error: aborting due to previous error
make: *** [x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib/stamp.std]
Error 101
make: *** Waiting for unfinished jobs....

On Sun, Aug 2, 2015 at 12:08 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-linux-64-x-android-t
http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/5916


Reply to this email directly or view it on GitHub
#27210 (comment).

@vadimcn

Copy link
Copy Markdown
ContributorAuthor

Fixed. Let's try again?

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ 96d1db2

@bors

bors commented Aug 3, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 96d1db2 with merge d99b3c5...

@bors

bors commented Aug 3, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-mac-64-opt

@alexcrichton

Copy link
Copy Markdown
Member

@bors: retry

On Mon, Aug 3, 2015 at 10:37 AM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-mac-64-opt
http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5957


Reply to this email directly or view it on GitHub
#27210 (comment).

bors added a commit that referenced this pull request Aug 3, 2015
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
@bors

bors commented Aug 3, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 96d1db2 with merge ceded6a...

@bors
bors merged commit 96d1db2 into rust-lang:masterAug 3, 2015
@alexcrichton

Copy link
Copy Markdown
Member

🎊

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Aug 11, 2015
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)
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Aug 12, 2015
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)
@vadimcn
vadimcn deleted the win64-eh-pers branch October 9, 2015 05:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@vadimcn@rust-highfive@bors@alexcrichton@brson@Gankra@liigo@nagisa