-
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
STATUS_ACCESS_VIOLATION on 'index out of bounds' Windows 7 with lto and avx #62762
Comments
Can you produce a backtrace for the crash? I'm assuming it happens somewhere in the panic implementation? |
The program stops before it can print a backtrace, and I don't think it's panic-related because upon further testing, the same access violation occurs even with That being said, here's the backtrace for
and the debugger output for
|
Sorry, what I had in mind here is a backtrace from lldb (typing in |
|
Are you certain that your CPU is capable of executing AVX instructions? |
It's an i5-4590, and is able to run the intrinsics in std::arch directly without issue. The problem also crops up when compiling with target-cpu=native. These are all the features detected by is_x86_feature_detected!: aes, pclmulqdq, rdrand, tsc, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2, fma, bmi1, bmi2, abm, lzcnt, popcnt, fxsr, xsave, xsaveopt |
Windows GNU
@jamesjerram can you check if it works with nightly? |
Assigning to myself to see if I can reproduce it myself and @nikic as they are somewhat actively on top of LLVM issues. |
I can confirm that it works properly with nightly. |
Probably a fix was pulled in with the LLVM update. As we can't backport that, this issue can probably be closed? |
With avx and lto enabled, index out of bounds causes a STATUS_ACCESS_VIOLATION instead of a panic. Initially encountered this problem in a program using rand::thread_rng() but narrowed down to a simpler test case found in issue #51794.
I tried this code:
with flags
-C lto -C target-feature=+avx
I expected to see this happen:
Instead, this happened:
Meta
rustc 1.36.0 (a53f9df 2019-07-03)
binary: rustc
commit-hash: a53f9df
commit-date: 2019-07-03
host: x86_64-pc-windows-msvc
release: 1.36.0
LLVM version: 8.0
lldb output:
The text was updated successfully, but these errors were encountered: