-
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
Optimizer incorrectly removing part of the code? #25919
Comments
Sounds like typical undefined behaviour (coming from an unsafe block, hopefully). |
I have a one I can try to reduce it, sure. |
@dpc I'd expect the issue to be in one your dependencies that uses unsafe code, rather than in your own project. |
could you run your code in debug mode under valgrind? that could possibly give an hint. |
|
Weird. Could you try and reduce that function? |
I tried, but it it's highly coupled with the rest of the code, and I'm very short on time. |
Without a reproduction, this is going to be basically impossible to fix. |
I don't think I'll be able to minimze this, so I'm closing. |
@rprichard : You're awesome! |
The original issue is said to be fixed, but I'm experiencing it on the same code. |
Ah, so I see it's a llvm problem and I guess llvm on my system does not have a fix. |
I have upgraded my F22 to F23, removed all older llvm versions, and the only llvm is: % llvm-link --version I'm still affected. Am I doing something wrong? I have tried tests from #26468, and these seem to work fine for me. :/ |
I cannot reproduce this specific issue with the following (in a docker container). I suspect that this is a LLVM 3.7 problem.
However, with the Fedora
@dpc I'm going to close this since I can't reproduce your specific failure, but please do ping us if you can still reproduce and we'll reopen. |
My code behaves differently in debug and release mode. In release mode pressing "y" to confirm exiting the game is going to be incorrectly ignored. From my investigation, it seems some part of the match expression is getting completely removed.
The affected code:
https://github.com/dpc/rhex/blob/issue/src/ui/curses.rs#L1119
Uncommenting the
info!
on line 1119 makes the game generate correct code even in release mode.[futex:lab/rust]% rustc --version
rustc 1.2.0-nightly (99c2f77 2015-05-29) (built 2015-05-29)
The text was updated successfully, but these errors were encountered: