-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
SIGILL in the binary compiled with -C target-cpu=native
on the latest nightly
#38218
Comments
I cannot reproduce. Does (when run from lib/kernel32) still reproduce?
If so, could you run it under a debugger and retrieve a backtrace?
|
@nagisa, well, the command you provided does work correctly, but as far as I can see, it happens not in the |
Here is the output of
|
In case it is helpful, here is the backtrace for the build script:
|
Could you also (Sidenote: seems like #36448 has resurfaced) |
Sure. here it is:
|
BTW, I had encountered it when I tried to install ripgrep somewhere around a month or a month and a half ago, there was exactly the same problem but I didn't report it then because I thought it was one of those occasional nightly instabilities. |
As a workaround I suggest using |
|
I have a similar problem where Rust is generating vmov instructions and these workarounds don't seem to work. I am using an Intel(R) Celeron(R) 2955U @ 1.40GHz. I think this is due to me using a repr(simd) hack to obtain better alignment (see https://sstewartgallus.com/git?p=uevents-rs.git;a=blob;f=src/cacheline.rs;h=389ab14a9c331f22ecfe35ed91986b2071a6264a;hb=HEAD |
See here for previous discussion. I have the same problem. Compiling the following code on my PC with use std::time::SystemTime;
fn main() {
let n = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_secs() % 1000;
let mut x = 0;
for i in 0..n {
x += i;
}
println!("{}", x);
} My compiler and CPU information:
|
@EFanZh The issue is that Rust will generate code for your CPU family, which is the Haswell family. Could you try compiling with no flags, and then add |
@GabrielMajeri I agree with you. Currently I can’t test your command, but I think it will crash If I enable AVX. Both gcc and clang can detect my CPU’s capability correctly, so I think Rust should do it too. |
I'm trying to build ripgrep with its SIMD optimizations on, and on Archlinux this means that ripgrep is compiled as follows:
However, the build fails with the following error:
I tried checking out the appropriate commit in the winapi-rs repo where kernel32-sys 0.2.2 is available, and was able to reproduce this problem directly with the kernel32-sys crate:
If I omit the RUSTFLAGS variable, everything compiles fine:
Compiler version:
Also, I'm running a Skylake i7 CPU, here is my /proc/cpuinfo, if it is relevant:
The text was updated successfully, but these errors were encountered: