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

llvm::mk_object_file to option type (fixes OS X crash) #1142

Closed
wants to merge 1 commit into from
Closed

llvm::mk_object_file to option type (fixes OS X crash) #1142

wants to merge 1 commit into from

Conversation

jwise
Copy link
Contributor

@jwise jwise commented Nov 7, 2011

llvm::mk_object_file should really return an option, since the underlying LLVM function can fail. Fixes a crash on OS X when rust has bad dylibs within eyeshot.

Probably other functions throughout the llvm bindings should also have option types returned when they could potentially return null from LLVM -- but this is at least enough to fix a crash in which a "bad" dylib (i.e., one that LLVM can't parse) causes rustc to crash.

…ying LLVM function can fail. Fixes a crash on OS X when rust has bad dylibs within eyeshot.
@marijnh
Copy link
Contributor

marijnh commented Nov 7, 2011

Thanks, integrated.

@marijnh marijnh closed this Nov 7, 2011
@brson
Copy link
Contributor

brson commented Nov 7, 2011

Very nice.

bjorn3 added a commit to bjorn3/rust that referenced this pull request Mar 5, 2021
It causes a miscompilation of lewton

Fixes rust-lang#1142
coastalwhite pushed a commit to coastalwhite/rust that referenced this pull request Aug 5, 2023
I'm working on `try_trait_v2` which will break this, so I'm going
around removing uses from the rustc tree where I can.
celinval pushed a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
* Subsection for intrinsics and unstable features

* Updates for Rust feature support

* Update link in "Undefined behavior"
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.

None yet

3 participants