-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Optimized code generates valgrind errors #5856
Comments
When Rust was zeroing everything (the stack segments and heap allocations), I think this check was always being masked so it was equivalent to having it disabled. I don't know the best way to deal with it, but I don't think disabling the class of error checking would be any worse than masking it with zeroing was. |
@echristo from LLVM mentioned on IRC that he was looking into this issue. Hopefully upstream will have some guidance for us. Disabling the 'jump depends on on uninitialized value' error in valgrind would significantly reduce the value of that tool. |
I've pushed a commit that adds lots of suppressions. When this is resolved those should all be removed so they don't disguise errors. |
Nominating for milestone 4, well-covered, since this affects our ability to use valgrind to its fullest extent. |
Visiting for triage. I agree with the nomination. We should get this fixed someday! |
accepted for well-covered milestone |
Need not block 1.0. Assigning P-low. |
This is still a problem, e.g. just running
I vaguely recall that this was due to enums, e.g. something handling an |
This isn't going to be fixed. It's a consequence of LLVM's optimized instruction scheduling and is entirely correct. They may provide a way to cripple the instruction scheduling to avoid this, but it wouldn't ever be a desired default for an optimized build. I don't think you'll find anyone interested in dealing with it because you might as well just flip on ASAN for Clang and GCC rather than |
Triage: @huonw 's |
So I'm not quite sure what the status here is. @thestinger is correct as I understand it: this cannot be fixed without crippling LLVM's optimizations. So should this be closed? |
Closing. This is an LLVM problem (and, AIUI, a general problem with optimizing code) -- valgrind doesn't handle this properly, and there's ~nothing we can do as I understand it. |
…ip1995 Remove old Symbol reexport I couldn't really tell what it was meant to improve. It seems more clear without the renaming to `Name`? changelog: none
Rollup of 5 pull requests Successful merges: - rust-lang#5837 (needless_collect: catch x: Vec<_> = iter.collect(); x.into_iter() ...) - rust-lang#5846 (Handle mapping to Option in `map_flatten` lint) - rust-lang#5848 (Add derive_ord_xor_partial_ord lint) - rust-lang#5852 (Add lint for duplicate methods of trait bounds) - rust-lang#5856 (Remove old Symbol reexport) Failed merges: r? @ghost changelog: rollup
We are accumulating a lot of valgrind suppressions because of this: http://llvm.org/bugs/show_bug.cgi?id=12319
The text was updated successfully, but these errors were encountered: