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

Raise noncontinuable exception when aborting on earlier Windows versions #76203

Closed
wants to merge 1 commit into from

Conversation

nxtn
Copy link

@nxtn nxtn commented Sep 1, 2020

See #33814 (comment) for background.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @LukasKalbertodt (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2020
@jyn514 jyn514 added O-windows Operating system: Windows A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows labels Sep 1, 2020
@nxtn nxtn force-pushed the failfast branch 4 times, most recently from bb00fe1 to c6ff359 Compare September 2, 2020 04:21
@nxtn nxtn marked this pull request as ready for review September 2, 2020 06:04
@LukasKalbertodt
Copy link
Member

I'm not qualified to review this PR. @rust-lang/libs can anyone of you take this?

}
} else {
match compat::lookup("kernel32", "RaiseFailFastException") {
Some(..) => c::RaiseFailFastException(ptr::null(), ptr::null(), 0),
Copy link
Member

Choose a reason for hiding this comment

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

I think this will cause a runtime missing symbol error on older Windows versions here since you are directly linking to the RaiseFailFastException symbol.

Copy link
Member

Choose a reason for hiding this comment

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

RaiseFailFastException requires Windows 7 so we'd need a fallback for XP/Vista.

}
} else {
c::RaiseFailFastException(ptr::null(), ptr::null(), 0);
Copy link
Member

Choose a reason for hiding this comment

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

Why is there no fallback to RaiseException here?

@bors
Copy link
Contributor

bors commented Sep 20, 2020

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

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@crlf0710 crlf0710 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 8, 2020
@crlf0710
Copy link
Member

crlf0710 commented Oct 8, 2020

@NextTurn Ping from triage: could you address the comments above? Thanks!

}
} else {
match compat::lookup("kernel32", "RaiseFailFastException") {
Copy link
Member

@m-ou-se m-ou-se Oct 8, 2020

Choose a reason for hiding this comment

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

If you put RaiseFailFastException in the compat_fn!{} block in c.rs, you can use c::RaiseFailFastException::is_available() here (since #76979).

@Dylan-DPC-zz
Copy link

@NextTurn thanks for taking the time to contribute. I have to close this due to inactivity. If you wish and you have the time you can open a new PR with these changes and we'll take it from there. Thanks

@Dylan-DPC-zz Dylan-DPC-zz added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows O-windows Operating system: Windows S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants