Skip to content
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

Fix personality_fn within the compiler_builtins #40254

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

nagisa
Copy link
Member

@nagisa nagisa commented Mar 4, 2017

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
Collaborator

r? @brson

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

@nagisa
Copy link
Member Author

nagisa commented Mar 4, 2017

(seems like a fallout of SNAP cleanup)

fn iabs(self) -> i128 {
let s = self >> 127;
let s = self.wrapping_shl(127);
Copy link
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
Member Author

Choose a reason for hiding this comment

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

Yes, sorry.

Copy link
Member Author

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 nagisa force-pushed the compiler-builtin-no-panic branch from dc5fdbc to 8f581cc Compare March 4, 2017 09:29
@est31
Copy link
Member

est31 commented Mar 4, 2017

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

@est31
Copy link
Member

est31 commented Mar 4, 2017

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

@est31
Copy link
Member

est31 commented Mar 4, 2017

@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
Member

cuviper commented Mar 4, 2017

@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
Member Author

nagisa commented Mar 4, 2017

@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
Member Author

nagisa commented Mar 4, 2017

#40256 is a patch against beta branch @cuviper

@cuviper
Copy link
Member

cuviper commented Mar 4, 2017

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

@cuviper
Copy link
Member

cuviper commented Mar 4, 2017

Everything looks good, thanks!

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 6, 2017

📌 Commit 8f581cc has been approved by alexcrichton

@alexcrichton alexcrichton 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
bors added a commit that referenced this pull request Mar 9, 2017
@bors bors merged commit 8f581cc into rust-lang:master Mar 9, 2017
@alexcrichton alexcrichton mentioned this pull request Mar 13, 2017
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants