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
{{ message }}
Repository navigation
Segfault in safe code that spawns a thread with an infinite loop when optimized #39753
valgrind ./inf
==8821== Memcheck, a memory error detector
==8821== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==8821== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==8821== Command: ./inf
==8821==
==8821== Thread 2:
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x110504: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:506)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==8821== by 0x10DF01: _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd0e958eef64c8c8a (in /tmp/inf)
==8821== by 0x1153B4: call_once<(),()> (boxed.rs:615)
==8821== by 0x1153B4: start_thread (thread.rs:21)
==8821== by 0x1153B4: std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939 (thread.rs:84)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x110508: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:506)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==8821== by 0x10DF01: _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd0e958eef64c8c8a (in /tmp/inf)
==8821== by 0x1153B4: call_once<(),()> (boxed.rs:615)
==8821== by 0x1153B4: start_thread (thread.rs:21)
==8821== by 0x1153B4: std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939 (thread.rs:84)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x13E721: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x13E78F: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x13E7BD: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x13D4CE: core::fmt::Formatter::pad_integral::h395315be99f81a5c (mod.rs:913)
==8821== by 0x13E80A: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x5703A09: strerror_r (_strerror.c:39)
==8821== by 0x57176D9: __xpg_strerror_r (xpg-strerror.c:29)
==8821== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==8821== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x5703A11: strerror_r (_strerror.c:39)
==8821== by 0x57176D9: __xpg_strerror_r (xpg-strerror.c:29)
==8821== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==8821== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821==
==8821== Use of uninitialised value of size 8
==8821== at 0x5703A1E: strerror_r (_strerror.c:40)
==8821== by 0x57176D9: __xpg_strerror_r (xpg-strerror.c:29)
==8821== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==8821== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x57176E5: __xpg_strerror_r (xpg-strerror.c:42)
==8821== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==8821== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==8821==
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x57176F1: __xpg_strerror_r (xpg-strerror.c:42)
==8821== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==8821== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==8821==
==8821== Use of uninitialised value of size 8
==8821== at 0x5717701: __xpg_strerror_r (xpg-strerror.c:42)
==8821== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==8821== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x13C9C5: write_fmt (mod.rs:1136)
==8821== by 0x13C9C5: {{closure}} (builders.rs:91)
==8821== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==8821== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==8821== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==8821== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==8821== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==8821==
thread '<unnamed>' panicked at '==8821== Syscall param write(buf) points to uninitialised byte(s)
==8821== at 0x52564BD: ??? (syscall-template.S:84)
==8821== by 0x1109AF: write (fd.rs:79)
==8821== by 0x1109AF: write (stdio.rs:57)
==8821== by 0x1109AF: write (stdio.rs:72)
==8821== by 0x1109AF: std::io::Write::write_all::h7c10a51290981adc (mod.rs:944)
==8821== by 0x110D29: _$LT$std..io..Write..write_fmt..Adaptor$LT$$u27$a$C$$u20$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::hded10b9de53cb4d5 (mod.rs:1004)
==8821== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==8821== by 0x110B42: std::io::Write::write_fmt::h0e5dfdfaa54059a4 (mod.rs:1015)
==8821== by 0x11096E: std::io::impls::_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$$u27$a$u20$mut$u20$W$GT$::write_fmt::h2b1de262c2db72a4 (impls.rs:56)
==8821== by 0x115F02: std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h6385b6959a2dd25b (panicking.rs:339)
==8821== by 0x115B6E: std::panicking::default_hook::he4f3b61755d7fa95 (panicking.rs:365)
==8821== by 0x1163B7: std::panicking::rust_panic_with_hook::hf00b8130f73095ec (panicking.rs:553)
==8821== by 0x1161F4: std::panicking::begin_panic::h6227f62cb2cdaeb4 (panicking.rs:515)
==8821== by 0x116169: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:499)
==8821== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==8821== Address 0x6414046 is in a rw- anonymous segment
==8821==
called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 0, message: "Success" } }', /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.
==8821== Conditional jump or move depends on uninitialised value(s)
==8821== at 0x10DDCC: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==8821== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==8821== by 0x10DF01: _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd0e958eef64c8c8a (in /tmp/inf)
==8821== by 0x1153B4: call_once<(),()> (boxed.rs:615)
==8821== by 0x1153B4: start_thread (thread.rs:21)
==8821== by 0x1153B4: std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939 (thread.rs:84)
==8821== by 0x524D6B9: start_thread (pthread_create.c:333)
==8821== by 0x577F82C: clone (clone.S:109)
==8821==
Oh, right, loop {} is diverging. However, I still get the segfault on macOS with the commit that is marked as fixing it. I'm (slowly) building master in a Linux VM to get up-to-date Valgrind output.
In Linux, against ba7cf7c, the code no longer segfaults, but it does panic:
$ RUST_BACKTRACE=1 ./inf
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 0, message: "Success" } }', /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:837
stack backtrace:
1: 0x5620c17327ca - std::sys::imp::backtrace::tracing::imp::write::h3188f035833a2635
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
2: 0x5620c1734f6f - std::panicking::default_hook::{{closure}}::h6385b6959a2dd25b
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:349
3: 0x5620c1734b6e - std::panicking::default_hook::he4f3b61755d7fa95
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:365
4: 0x5620c17353b7 - std::panicking::rust_panic_with_hook::hf00b8130f73095ec
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:553
5: 0x5620c17351f4 - std::panicking::begin_panic::h6227f62cb2cdaeb4
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:515
6: 0x5620c1735169 - std::panicking::begin_panic_fmt::h173eadd80ae64bec
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:499
7: 0x5620c17350f7 - rust_begin_unwind
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:475
8: 0x5620c175b11d - core::panicking::panic_fmt::h3b2d1e30090844ff
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/panicking.rs:69
9: 0x5620c172cdc4 - core::result::unwrap_failed::h822856a25f2ebc35
10: 0x5620c173cf0a - __rust_maybe_catch_panic
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
11: 0x5620c172cf01 - <F as alloc::boxed::FnBox<A>>::call_box::hd0e958eef64c8c8a
12: 0x5620c17343b4 - std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/liballoc/boxed.rs:615
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
13: 0x7f32984a66b9 - start_thread
14: 0x7f3297fc682c - clone
15: 0x0 - <unknown>
And Valgrind is still unhappy about it:
==15546== Memcheck, a memory error detector
==15546== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==15546== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==15546== Command: ./inf
==15546==
==15546== Thread 2:
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x110504: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:506)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==15546== by 0x10DF01: _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd0e958eef64c8c8a (in /tmp/inf)
==15546== by 0x1153B4: call_once<(),()> (boxed.rs:615)
==15546== by 0x1153B4: start_thread (thread.rs:21)
==15546== by 0x1153B4: std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939 (thread.rs:84)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x110508: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:506)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==15546== by 0x10DF01: _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd0e958eef64c8c8a (in /tmp/inf)
==15546== by 0x1153B4: call_once<(),()> (boxed.rs:615)
==15546== by 0x1153B4: start_thread (thread.rs:21)
==15546== by 0x1153B4: std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939 (thread.rs:84)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x13E721: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x13E78F: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x13E7BD: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x13D4CE: core::fmt::Formatter::pad_integral::h395315be99f81a5c (mod.rs:913)
==15546== by 0x13E80A: core::fmt::num::_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$::fmt::hd5ff6057022eb859 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x1105AE: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:507)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x5703A09: strerror_r (_strerror.c:39)
==15546== by 0x57176D9: __xpg_strerror_r (xpg-strerror.c:29)
==15546== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==15546== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x5703A11: strerror_r (_strerror.c:39)
==15546== by 0x57176D9: __xpg_strerror_r (xpg-strerror.c:29)
==15546== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==15546== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546==
==15546== Use of uninitialised value of size 8
==15546== at 0x5703A1E: strerror_r (_strerror.c:40)
==15546== by 0x57176D9: __xpg_strerror_r (xpg-strerror.c:29)
==15546== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==15546== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x57176E5: __xpg_strerror_r (xpg-strerror.c:42)
==15546== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==15546== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==15546==
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x57176F1: __xpg_strerror_r (xpg-strerror.c:42)
==15546== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==15546== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==15546==
==15546== Use of uninitialised value of size 8
==15546== at 0x5717701: __xpg_strerror_r (xpg-strerror.c:42)
==15546== by 0x11480D: std::sys::imp::os::error_string::h0e47a1bf8fcf955d (os.rs:97)
==15546== by 0x1105C0: _$LT$std..io..error..Repr$u20$as$u20$core..fmt..Debug$GT$::fmt::h48cfe87c853aa8b2 (error.rs:508)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x13C9C5: write_fmt (mod.rs:1136)
==15546== by 0x13C9C5: {{closure}} (builders.rs:91)
==15546== by 0x13C9C5: and_then<(),core::fmt::Error,(),closure> (result.rs:601)
==15546== by 0x13C9C5: core::fmt::builders::DebugStruct::field::h0cdc6f07946244db (builders.rs:79)
==15546== by 0x116D58: _$LT$std..io..error..Error$u20$as$u20$core..fmt..Debug$GT$::fmt::h474831f315b88964 (in /tmp/inf)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x11614D: write_fmt<collections::string::String> (mod.rs:130)
==15546== by 0x11614D: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:498)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== by 0x13C11D: core::panicking::panic_fmt::h3b2d1e30090844ff (panicking.rs:69)
==15546== by 0x10DDC4: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==15546==
thread '<unnamed>' panicked at '==15546== Syscall param write(buf) points to uninitialised byte(s)
==15546== at 0x52564BD: ??? (syscall-template.S:84)
==15546== by 0x1109AF: write (fd.rs:79)
==15546== by 0x1109AF: write (stdio.rs:57)
==15546== by 0x1109AF: write (stdio.rs:72)
==15546== by 0x1109AF: std::io::Write::write_all::h7c10a51290981adc (mod.rs:944)
==15546== by 0x110D29: _$LT$std..io..Write..write_fmt..Adaptor$LT$$u27$a$C$$u20$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::hded10b9de53cb4d5 (mod.rs:1004)
==15546== by 0x13D415: core::fmt::write::ha410d2e3733df97b (mod.rs:831)
==15546== by 0x110B42: std::io::Write::write_fmt::h0e5dfdfaa54059a4 (mod.rs:1015)
==15546== by 0x11096E: std::io::impls::_$LT$impl$u20$std..io..Write$u20$for$u20$$RF$$u27$a$u20$mut$u20$W$GT$::write_fmt::h2b1de262c2db72a4 (impls.rs:56)
==15546== by 0x115F02: std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::h6385b6959a2dd25b (panicking.rs:339)
==15546== by 0x115B6E: std::panicking::default_hook::he4f3b61755d7fa95 (panicking.rs:365)
==15546== by 0x1163B7: std::panicking::rust_panic_with_hook::hf00b8130f73095ec (panicking.rs:553)
==15546== by 0x1161F4: std::panicking::begin_panic::h6227f62cb2cdaeb4 (panicking.rs:515)
==15546== by 0x116169: std::panicking::begin_panic_fmt::h173eadd80ae64bec (panicking.rs:499)
==15546== by 0x1160F7: rust_begin_unwind (panicking.rs:475)
==15546== Address 0x6414046 is in a rw- anonymous segment
==15546==
called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 0, message: "Success" } }', /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.
==15546== Conditional jump or move depends on uninitialised value(s)
==15546== at 0x10DDCC: core::result::unwrap_failed::h822856a25f2ebc35 (in /tmp/inf)
==15546== by 0x11DF0A: __rust_maybe_catch_panic (lib.rs:98)
==15546== by 0x10DF01: _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hd0e958eef64c8c8a (in /tmp/inf)
==15546== by 0x1153B4: call_once<(),()> (boxed.rs:615)
==15546== by 0x1153B4: start_thread (thread.rs:21)
==15546== by 0x1153B4: std::sys::imp::thread::Thread::new::thread_start::he018521f53b24939 (thread.rs:84)
==15546== by 0x524D6B9: start_thread (pthread_create.c:333)
==15546== by 0x577F82C: clone (clone.S:109)
==15546==
Activity
shepmaster commentedon Feb 12, 2017
The original poster there also had this backtrace:
shepmaster commentedon Feb 12, 2017
LLDB (without debugging symbols) says:
shepmaster commentedon Feb 12, 2017
Setting a breakpoint on
unwrap_failedgets this better backtrace:hanna-kruppe commentedon Feb 12, 2017
Might be #39432? There's no nightly with #39721 in it yet, making it hard to try if that fixed it.
shepmaster commentedon Feb 12, 2017
@rkruppe certainly seems related, but there's no
!here AFAICS. If the same, could mean the other issue has a larger scope than it appears.shepmaster commentedon Feb 12, 2017
However, I've got a fresh build going, so I can check in a little bit.
shepmaster commentedon Feb 12, 2017
I updated to ba7cf7c which contains ca92c51, but the issue still appears
shepmaster commentedon Feb 12, 2017
Some disassembly:
The
EXC_BAD_ACCESS/EXC_I386_GPFLToccurs on the 4th instruction there.The registers:
shepmaster commentedon Feb 12, 2017
Valgrind output (code compiled with Rust 1.15.1):
shepmaster commentedon Feb 12, 2017
Oh, right,
loop {}is diverging. However, I still get the segfault on macOS with the commit that is marked as fixing it. I'm (slowly) building master in a Linux VM to get up-to-date Valgrind output.liuxy600 commentedon Feb 12, 2017
A shorter version also crashes:
But, it works well if I add
println!("123")in the loop:shepmaster commentedon Feb 12, 2017
In Linux, against ba7cf7c, the code no longer segfaults, but it does panic:
And Valgrind is still unhappy about it:
sfackler commentedon Feb 12, 2017
Dup of #28728
shepmaster commentedon Feb 12, 2017
Agreed. The LLVM IR has the same telltale sign: