-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Wrong return type of extern
functions
#10592
Comments
This may be related to #10308, cc @jld @nikomatsakis |
Bug in ABI code, definitely -- @honzasp what target architecture / operating system? |
I wasn't sure, because the rustc's own LLVM bindings (in As for the version: ~ $ rustc --version |
Should be fixed on master now. #10684, which changes rustc's own LLVM bindings to use an enum for TypeKind like the example at the top of this issue, passed local tests on |
Fix bug with getting parent directories in `lookup_conf_file` Currently `lookup_conf_file` doesn't canonicalize the configuration directory before using [`PathBuf::pop`](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.pop) to get the parent directory. This isn't usually an issue when clippy is invoked via `cargo clippy` as `CARGO_MANIFEST_DIR` is already canonicalized. However, this currently causes `clippy-driver` to ignore any `clippy.toml` in any parent directories when `CARGO_MANIFEST_DIR` and `CLIPPY_CONF_DIR` are not set. changelog: Fix a bug that would cause parent directories not to be searched for `clippy.toml` when using `clippy-driver` directly.
Hi,
I was trying to use the LLVM C bindings from Rust, but I ran into a mysterious error when I tried to use
LLVMGetTypeKind
. The Rust program is like this:When compiled and executed, LLVM crashes with
After some investigation, I made
rustc
emit LLVM bitcode and found something strange:rustc
declared theLLVMGetTypeKind
function with wrong parameters, so the function, when called, got a pointer to unitialized value on stack instead of aContextRef
.I tried to declare
LLVMGetTypeKind
as a function returningc_uint
and everything worked well (it is probably the reason whyrustc
's LLVM bindings declareLLVMTypeKind
as a series of static variables).Is this a bug or a feature? If it is a feature, it is worth documenting! :)
The text was updated successfully, but these errors were encountered: