Skip to content

Fix personality_fn within the compiler_builtins - #40254

Merged
bors merged 1 commit into
rust-lang:masterfrom
nagisa:compiler-builtin-no-panic
Mar 9, 2017
Merged

Fix personality_fn within the compiler_builtins#40254
bors merged 1 commit into
rust-lang:masterfrom
nagisa:compiler-builtin-no-panic

Conversation

@nagisa

@nagisanagisa commented Mar 4, 2017

Copy link
Copy Markdown
Member

compiler_builtins may not have any unwinding within it to link correctly. This is notoriously
finicky, and this small piece of change removes yet another case where personality function
happens to get introduced.

Side note: I do remember solving the exact same thing before. I wonder why it has reappered...

@cuviper, could you please try building beta with this patch applied? It should apply cleanly. If it works, I’ll nominate to land this into beta.

Fixes(?) #40251

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @brson

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

@nagisa

Copy link
Copy Markdown
MemberAuthor

(seems like a fallout of SNAP cleanup)

Comment threadsrc/libcompiler_builtins/lib.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.

Should be wrapping_shr?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Yes, sorry.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed.

compiler_builtins may not have any unwinding within it to link correctly. This is notoriously
finicky, and this small piece of change removes yet another case where personality function
happens to get introduced.
Side note: I do remember solving the exact same thing before. I wonder why it has reappered...
@nagisa
nagisaforce-pushed the compiler-builtin-no-panic branch from dc5fdbc to 8f581ccCompareMarch 4, 2017 09:29
@est31

est31 commented Mar 4, 2017

Copy link
Copy Markdown
Member

I don't see any conditional jump in the disassembly of that function. It would be very weird if it were the cause.

@est31

est31 commented Mar 4, 2017

Copy link
Copy Markdown
Member

... except if LLVM has a bug in their garbage collector.

@est31

est31 commented Mar 4, 2017

Copy link
Copy Markdown
Member

@nagisa I think the code was introduced by commit 29e01af . And IF it were introduced by the snap cleanup, it wouldn't be present on beta.

@cuviper

Copy link
Copy Markdown
Member

@cuviper, could you please try building beta with this patch applied? It should apply cleanly. If it works, I’ll nominate to land this into beta.

It doesn't apply cleanly, because of stage0 hackery, but it's straightforward enough. I'm having other troubles in my build root right now, and it's very late here, so I'll have to mess with it later...

@nagisa

Copy link
Copy Markdown
MemberAuthor

@cuviper well, the point here is basically to move fn uabs body from the trait to impls here. I’ll make a PR against beta shortly.

@est31 I certainly remember us "fixing" similar issue where a trait function was called and introduced a personality_fn at one point.

nagisa added a commit to nagisa/rust that referenced this pull request Mar 4, 2017
@nagisa

Copy link
Copy Markdown
MemberAuthor

#40256 is a patch against beta branch @cuviper

@cuviper

Copy link
Copy Markdown
Member

My i686 build works with #40256, thanks! I'm trying native builds now on all arches...

@cuviper

Copy link
Copy Markdown
Member

Everything looks good, thanks!

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Mar 6, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 8f581cc has been approved by alexcrichton

@alexcrichtonalexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Mar 6, 2017
bors added a commit that referenced this pull request Mar 7, 2017
bors added a commit that referenced this pull request Mar 8, 2017
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 8, 2017
…=alexcrichton
Fix personality_fn within the compiler_builtins
compiler_builtins may not have any unwinding within it to link correctly. This is notoriously
finicky, and this small piece of change removes yet another case where personality function
happens to get introduced.
Side note: I do remember solving the exact same thing before. I wonder why it has reappered...
@cuviper, could you please try building beta with this patch applied? It should apply cleanly. If it works, I’ll nominate to land this into beta.
Fixes(?) rust-lang#40251
@arielb1arielb1 mentioned this pull request Mar 8, 2017
bors added a commit that referenced this pull request Mar 9, 2017
@bors
bors merged commit 8f581cc into rust-lang:masterMar 9, 2017
@alexcrichtonalexcrichton mentioned this pull request Mar 13, 2017
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@nagisa@rust-highfive@est31@cuviper@alexcrichton@bors@brson