Skip to content
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

On i686 release builds, Valgrind reports depending on uninitialized values #63023

Closed
tspiteri opened this issue Jul 26, 2019 · 4 comments
Closed
Labels
O-x86_32 Target: x86 processors, 32 bit (like i686-*)

Comments

@tspiteri
Copy link
Contributor

For the following main.rs

fn main() {
    let x = &[0i32];
    let _ = (x.iter().map(|_| 1i32))
        .chain(x.iter().map(|_| 1i32))
        .chain(x.iter().map(|_| 1i32))
        .chain(x.iter().map(|_| 1i32))
        .chain(x.iter().map(|_| 1i32))
        .collect::<Vec<i32>>();
}

On i686 GNU/Linux, for a release build, Valgrind reports “Conditional jump or move depends on uninitialised value(s)”.

I couldn’t reproduce the issue on debug builds or on x86_64.

$ uname -a
Linux Fedora-i686 4.17.3-200.fc28.i686 #1 SMP Tue Jun 26 14:19:07 UTC 2018 i686 i686 i386 GNU/Linux

$ rustc -V --verbose
rustc 1.36.0 (a53f9df32 2019-07-03)
binary: rustc
commit-hash: a53f9df32fbb0b5f4382caaad8f1a46f36ea887c
commit-date: 2019-07-03
host: i686-unknown-linux-gnu
release: 1.36.0
LLVM version: 8.0

$ cargo clean

$ cargo run --release
   Compiling try v0.1.0 (/home/user/try)
    Finished release [optimized] target(s) in 0.67s
     Running `target/release/try`

$ valgrind target/release/try
==20136== Memcheck, a memory error detector
==20136== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==20136== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==20136== Command: target/release/try
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x10A608: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/user/try/target/release/try)
==20136==    by 0x109FF0: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x10AD03: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/user/try/target/release/try)
==20136==    by 0x109FF0: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x10AD22: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/user/try/target/release/try)
==20136==    by 0x109FF0: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x10AD2C: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/user/try/target/release/try)
==20136==    by 0x109FF0: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x111D1F: alloc (alloc.rs:9)
==20136==    by 0x111D1F: __rdl_alloc (alloc.rs:239)
==20136==    by 0x10AD3C: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/user/try/target/release/try)
==20136==    by 0x109FF0: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x483147B: malloc (vg_replace_malloc.c:309)
==20136==    by 0x111D29: alloc (alloc.rs:10)
==20136==    by 0x111D29: __rdl_alloc (alloc.rs:239)
==20136==    by 0x10AD3C: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/user/try/target/release/try)
==20136==    by 0x109FF0: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== Conditional jump or move depends on uninitialised value(s)
==20136==    at 0x109FFA: try::main (in /home/user/try/target/release/try)
==20136==    by 0x10A075: std::rt::lang_start::{{closure}} (in /home/user/try/target/release/try)
==20136==    by 0x110515: {{closure}} (rt.rs:49)
==20136==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==20136==    by 0x11243E: {{closure}} (rt.rs:49)
==20136==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==20136==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==20136==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==20136==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==20136==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==20136==    by 0x10A050: main (in /home/user/try/target/release/try)
==20136== 
==20136== 
==20136== HEAP SUMMARY:
==20136==     in use at exit: 0 bytes in 0 blocks
==20136==   total heap usage: 11 allocs, 11 frees, 1,681 bytes allocated
==20136== 
==20136== All heap blocks were freed -- no leaks are possible
==20136== 
==20136== For counts of detected and suppressed errors, rerun with: -v
==20136== Use --track-origins=yes to see where uninitialised values come from
==20136== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)
@tspiteri
Copy link
Contributor Author

After adding debug symbols to the release build

[profile.release]
debug = true

the output is

==4178== Memcheck, a memory error detector
==4178== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==4178== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==4178== Command: target/release/try
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x10A098: spec_extend<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1857)
==4178==    by 0x10A098: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (vec.rs:1845)
==4178==    by 0x10A940: from_iter<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1731)
==4178==    by 0x10A940: collect<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>,alloc::vec::Vec<i32>> (iterator.rs:1465)
==4178==    by 0x10A940: try::main (main.rs:3)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x10A793: reserve_internal<i32,alloc::alloc::Global> (raw_vec.rs:650)
==4178==    by 0x10A793: reserve<i32,alloc::alloc::Global> (raw_vec.rs:491)
==4178==    by 0x10A793: reserve<i32> (vec.rs:457)
==4178==    by 0x10A793: spec_extend<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1858)
==4178==    by 0x10A793: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (vec.rs:1845)
==4178==    by 0x10A940: from_iter<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1731)
==4178==    by 0x10A940: collect<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>,alloc::vec::Vec<i32>> (iterator.rs:1465)
==4178==    by 0x10A940: try::main (main.rs:3)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x10A7B2: repeat (alloc.rs:242)
==4178==    by 0x10A7B2: array<i32> (alloc.rs:320)
==4178==    by 0x10A7B2: reserve_internal<i32,alloc::alloc::Global> (raw_vec.rs:659)
==4178==    by 0x10A7B2: reserve<i32,alloc::alloc::Global> (raw_vec.rs:491)
==4178==    by 0x10A7B2: reserve<i32> (vec.rs:457)
==4178==    by 0x10A7B2: spec_extend<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1858)
==4178==    by 0x10A7B2: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (vec.rs:1845)
==4178==    by 0x10A940: from_iter<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1731)
==4178==    by 0x10A940: collect<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>,alloc::vec::Vec<i32>> (iterator.rs:1465)
==4178==    by 0x10A940: try::main (main.rs:3)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x10A7BC: map_err<core::alloc::Layout,core::alloc::LayoutErr,alloc::collections::CollectionAllocErr,closure> (result.rs:521)
==4178==    by 0x10A7BC: reserve_internal<i32,alloc::alloc::Global> (raw_vec.rs:659)
==4178==    by 0x10A7BC: reserve<i32,alloc::alloc::Global> (raw_vec.rs:491)
==4178==    by 0x10A7BC: reserve<i32> (vec.rs:457)
==4178==    by 0x10A7BC: spec_extend<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1858)
==4178==    by 0x10A7BC: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (vec.rs:1845)
==4178==    by 0x10A940: from_iter<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1731)
==4178==    by 0x10A940: collect<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>,alloc::vec::Vec<i32>> (iterator.rs:1465)
==4178==    by 0x10A940: try::main (main.rs:3)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x111D1F: alloc (alloc.rs:9)
==4178==    by 0x111D1F: __rdl_alloc (alloc.rs:239)
==4178==    by 0x10A7CC: alloc (alloc.rs:81)
==4178==    by 0x10A7CC: alloc (alloc.rs:169)
==4178==    by 0x10A7CC: reserve_internal<i32,alloc::alloc::Global> (raw_vec.rs:668)
==4178==    by 0x10A7CC: reserve<i32,alloc::alloc::Global> (raw_vec.rs:491)
==4178==    by 0x10A7CC: reserve<i32> (vec.rs:457)
==4178==    by 0x10A7CC: spec_extend<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1858)
==4178==    by 0x10A7CC: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (vec.rs:1845)
==4178==    by 0x10A940: from_iter<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1731)
==4178==    by 0x10A940: collect<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>,alloc::vec::Vec<i32>> (iterator.rs:1465)
==4178==    by 0x10A940: try::main (main.rs:3)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x483147B: malloc (vg_replace_malloc.c:309)
==4178==    by 0x111D29: alloc (alloc.rs:10)
==4178==    by 0x111D29: __rdl_alloc (alloc.rs:239)
==4178==    by 0x10A7CC: alloc (alloc.rs:81)
==4178==    by 0x10A7CC: alloc (alloc.rs:169)
==4178==    by 0x10A7CC: reserve_internal<i32,alloc::alloc::Global> (raw_vec.rs:668)
==4178==    by 0x10A7CC: reserve<i32,alloc::alloc::Global> (raw_vec.rs:491)
==4178==    by 0x10A7CC: reserve<i32> (vec.rs:457)
==4178==    by 0x10A7CC: spec_extend<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1858)
==4178==    by 0x10A7CC: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (vec.rs:1845)
==4178==    by 0x10A940: from_iter<i32,core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>> (vec.rs:1731)
==4178==    by 0x10A940: collect<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::chain::Chain<core::iter::adapters::Map<core::slice::Iter<i32>, closure>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>, core::iter::adapters::Map<core::slice::Iter<i32>, closure>>,alloc::vec::Vec<i32>> (iterator.rs:1465)
==4178==    by 0x10A940: try::main (main.rs:3)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== Conditional jump or move depends on uninitialised value(s)
==4178==    at 0x10A94A: dealloc_buffer<i32,alloc::alloc::Global> (raw_vec.rs:708)
==4178==    by 0x10A94A: drop<i32,alloc::alloc::Global> (raw_vec.rs:718)
==4178==    by 0x10A94A: real_drop_in_place<alloc::raw_vec::RawVec<i32, alloc::alloc::Global>> (ptr.rs:195)
==4178==    by 0x10A94A: real_drop_in_place<alloc::vec::Vec<i32>> (ptr.rs:195)
==4178==    by 0x10A94A: try::main (main.rs:8)
==4178==    by 0x10AE05: std::rt::lang_start::{{closure}} (rt.rs:64)
==4178==    by 0x110515: {{closure}} (rt.rs:49)
==4178==    by 0x110515: std::sys_common::backtrace::__rust_begin_short_backtrace (backtrace.rs:136)
==4178==    by 0x11243E: {{closure}} (rt.rs:49)
==4178==    by 0x11243E: std::panicking::try::do_call (panicking.rs:293)
==4178==    by 0x114087: __rust_maybe_catch_panic (lib.rs:85)
==4178==    by 0x112EC5: try<i32,closure> (panicking.rs:272)
==4178==    by 0x112EC5: catch_unwind<closure,i32> (panic.rs:394)
==4178==    by 0x112EC5: std::rt::lang_start_internal (rt.rs:48)
==4178==    by 0x10A9A6: main (in /home/user/try/target/release/try)
==4178==  Uninitialised value was created by a stack allocation
==4178==    at 0x10A8D1: try::main (main.rs:1)
==4178== 
==4178== 
==4178== HEAP SUMMARY:
==4178==     in use at exit: 0 bytes in 0 blocks
==4178==   total heap usage: 11 allocs, 11 frees, 1,681 bytes allocated
==4178== 
==4178== All heap blocks were freed -- no leaks are possible
==4178== 
==4178== For counts of detected and suppressed errors, rerun with: -v
==4178== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

@jonas-schievink
Copy link
Contributor

@tspiteri any reason to assume this is not a false positive? They usually are.

@tspiteri
Copy link
Contributor Author

I was already kinda suspecting they were false positives, but wasn't aware they usually are so I opened the issue.

@jonas-schievink
Copy link
Contributor

This looks very similar to #5856, so closing in favor of that, unless something indicates this is different.

@Noratrieb Noratrieb added O-x86_32 Target: x86 processors, 32 bit (like i686-*) and removed O-x86-all labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-x86_32 Target: x86 processors, 32 bit (like i686-*)
Projects
None yet
Development

No branches or pull requests

3 participants