You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See patch 43b219d . The code before the patch runs fine with optimization turned off, but corrupts the result of the alt (when the third, bottom branch was taken) when optimization is on. This simple transformation -- assigning to a variable instead of returning from the block, removes the issue.
Either this is a really obscure compilation bug (I've failed to create a reduced test case so far), or it's some kind of corruption in another part of the compiler that shows up unpredictably based on the shape of the code.
Activity
marijnh commentedon Sep 22, 2011
I've been digging into this today. It is apparently related to LLVM moving the load from the return pointer above the function call, resulting in garbage. This only occurs in very specific circumstances. It appears to be an LLVM bug. Trying to get some LLVM person to comment on it (https://gist.github.com/1235034)
marijnh commentedon Sep 22, 2011
LLVM bug at http://llvm.org/bugs/show_bug.cgi?id=10987
brson commentedon Sep 22, 2011
Nice sleuthing!
marijnh commentedon Sep 23, 2011
This is fixed in LLVM.. I'll close this issue the next time we update LLVM on the tinderboxes.
(At which point we should also remove the val_ty hack near https://github.com/graydon/rust/blob/master/src/comp/middle/trans_alt.rs#L429 )
marijnh commentedon Oct 9, 2011
LLVM was upgraded, so this should not occur anymore. Closing.
feat: YIN algorithm (rust-lang#940)
Merge rust-lang#940