Skip to content

Use LLVM_BUILTIN_TRAP in swift::crash instead of our own solution #6938

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

Merged
merged 1 commit into from
Jan 21, 2017
Merged

Use LLVM_BUILTIN_TRAP in swift::crash instead of our own solution #6938

merged 1 commit into from
Jan 21, 2017

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Jan 20, 2017

Not sure if the old GCC comment applies

@hughbe
Copy link
Contributor Author

hughbe commented Jan 20, 2017

@swift-ci please smoke test

@compnerd
Copy link
Member

LGTM; the gcc but is not very important as the runtime requires clang to build anyways.

@slavapestov slavapestov merged commit 28a87e6 into swiftlang:master Jan 21, 2017
@hughbe hughbe deleted the swift-crash branch January 21, 2017 08:13
@gparker42
Copy link
Contributor

The issue might be that __builtin_trap on Intel CPUs emits a ud2 instruction (which causes SIGILL) instead of an int3 instruction (which causes SIGTRAP).

I don't think we care about the precise signal generated as we attempt to halt the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants