-
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
use-of-uninitialized-value with String usage #54365
Comments
This is highly likely to be a valgrind false positive, we have had many of those historically |
I cannot say if it's related. I have the same issue with use std::fs::File;
fn main() {
let _ = File::open("foo");
}
These may be the manifestations of some limitations of the memory sanitizer (a.k.a false positives). Similarly to https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions, is there any way to set up a black list for the memory sanitizers in function calls to std (or any other crates)? |
Same with |
This might be a duplicate of #39610. |
MSAN always requires you to have all code (including libstd, and libc) compiled with MSAN. If all you're doing is compiling your code with it, you'll get tons of false positives. Unless there's more going on here, I think this can be closed. |
As mentioned earlier, MemorySanitizer requires all code to be instrumented. The documentation describes how to instrument the Rust standard library using cargo build-std functionality. This should be closed along with #49893. |
The following code:
causes the following error when compiled with
RUSTFLAG="-Z sanitizer=memory"
:Other string usages like calling
push()
causes a similar error.Thanks to fix the issue.
The text was updated successfully, but these errors were encountered: