{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/32353","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/32353/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/32353/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/32353/events","html_url":"https://github.com/rust-lang/rust/issues/32353","id":142054303,"number":32353,"title":"Compiletest segfaults on Windows (MSYS2) due to some string formatting issues","user":{"login":"petrochenkov","id":5751617,"avatar_url":"https://avatars.githubusercontent.com/u/5751617?v=3","gravatar_id":"","url":"https://api.github.com/users/petrochenkov","html_url":"https://github.com/petrochenkov","followers_url":"https://api.github.com/users/petrochenkov/followers","following_url":"https://api.github.com/users/petrochenkov/following{/other_user}","gists_url":"https://api.github.com/users/petrochenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/petrochenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrochenkov/subscriptions","organizations_url":"https://api.github.com/users/petrochenkov/orgs","repos_url":"https://api.github.com/users/petrochenkov/repos","events_url":"https://api.github.com/users/petrochenkov/events{/privacy}","received_events_url":"https://api.github.com/users/petrochenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-19T11:43:22Z","updated_at":"2016-03-20T19:28:02Z","closed_at":"2016-03-20T19:28:02Z","body":"Happens on the current Rust master (b9a93fad92a3411a0e452e339af06703e31c1464) with freshly updated MSYS2 packages.\r\n\r\nWay to reproduce:\r\n```\r\nmake check-stage1-rpass\r\n```\r\n\r\n`gdb` output\r\n```\r\nThread 279 received signal SIGSEGV, Segmentation fault.\r\n[Switching to Thread 1056.0x13c]\r\n0x000000006def4ac0 in fmt::Write::write_fmt::Adapter$LT$$u27$a$C$$u20$T$GT$.Write::write_str::h7588194824453486976 ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n(gdb) bt\r\n#0  0x000000006def4ac0 in fmt::Write::write_fmt::Adapter$LT$$u27$a$C$$u20$T$GT$.Write::write_str::h7588194824453486976 ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#1  0x000000006df3f063 in fmt::write::hc0b53eec4d9a5e50sAW ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#2  0x000000006dec6c1c in sys_common::unwind::begin_unwind_fmt::h91b691f30a1273b8YXt ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#3  0x000000006def4a73 in rust_begin_unwind ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#4  0x000000006df17929 in panicking::panic_fmt::h9289505c6075ed65fLL ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#5  0x0000000000416a4f in result::unwrap_failed::h8016291200450874397 ()\r\n#6  0x00000000004161f0 in procsrv::run::hff07197822f7da739ba ()\r\n#7  0x000000000042d7c4 in runtest::compose_and_run::he8c3eac34dc9c102yJc ()\r\n#8  0x00000000004294b8 in runtest::exec_compiled_test::h9d91a2bbaa51931cXCc ()\r\n#9  0x000000000042985e in runtest::run_rpass_test_revision::hc39d38e4afba1259Sbb ()\r\n#10 0x000000000041d7de in runtest::run_rpass_test::h835402f6446fb802wbb ()\r\n#11 0x000000000040e853 in runtest::run::ha22317b217fe81e35Wa ()\r\n#12 0x000000000041435d in boxed::F.FnBox$LT$A$GT$::call_box::h14820138337126314305 ()\r\n#13 0x000000006a2235f4 in sys_common::unwind::try::try_fn::h12278403829978334973 ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\test-9026086f.dll\r\n#14 0x000000006def499b in sys_common::unwind::inner_try::hd46991784c8d2dddUVt\r\n    ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#15 0x000000006a2239ab in boxed::F.FnBox$LT$A$GT$::call_box::h6711279820647761121 ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\test-9026086f.dll\r\n#16 0x000000006deffa9a in sys::thread::Thread::new::thread_start::hb954eea791cc0c9c6Gz ()\r\n   from C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin\\std-9026086f.dll\r\n#17 0x00007ffcd5ac13d2 in KERNEL32!BaseThreadInitThunk ()\r\n   from C:\\Windows\\system32\\kernel32.dll\r\n#18 0x00007ffcd61c54e4 in ntdll!RtlUserThreadStart ()\r\n   from C:\\Windows\\SYSTEM32\\ntdll.dll\r\n#19 0x0000000000000000 in ?? ()\r\n```\r\n\r\nThere are some other tests failing without segfault for the same reasons, for example `run-pass\\bare-fn-implements-fn-mut.rs`\r\nTest output (note the corrupted strings in the test stderr and test paths).\r\nThe same code works successfully when compiled and run without compiletest.\r\n\r\n```\r\n$ make check-stage1-rpass TESTNAME=bare-fn-implements-fn-mut\r\ncfg: version 1.9.0-dev (b9a93fad9 2016-03-18)\r\ncfg: build triple x86_64-pc-windows-gnu\r\ncfg: host triples x86_64-pc-windows-gnu\r\ncfg: target triples x86_64-pc-windows-gnu\r\ncfg: host for x86_64-pc-windows-gnu is x86_64\r\ncfg: os for x86_64-pc-windows-gnu is pc-windows-gnu\r\ncfg: no good valgrind for x86_64-pc-windows-gnu\r\ncfg: using CC=gcc (CFG_CC)\r\ncfg: disabling valgrind run-pass tests\r\ncfg: including test rules\r\ncfg: lexer tooling not available, skipping lexer test...\r\nrun rpass [x86_64-pc-windows-gnu]: x86_64-pc-windows-gnu/stage1/bin/compiletest.exe\r\n\r\nrunning 1 test\r\ntest [run-pass] ▒run-pass\\bare-fn-implements-fn-mut.rs ... FAILED\r\n\r\nfailures:\r\n\r\n---- [run-pass] ▒run-pass\\bare-fn-implements-fn-mut.rs stdout ----\r\n\r\nerror: test run failed!\r\nstatus: exit code: 101\r\ncommand: PATH=\"x86_64-pc-windows-gnu/stage1/lib/rustlib/x86_64-pc-windows-gnu/lib;C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\stage1\\bin;C:\\msys64\\home\\we\\rust\\x86_64-pc-windows-gnu\\llvm\\Release\\lib;C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\local\\bin;C:\\msys64\\usr\\bin;C:\\msys64\\usr\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\OpenVPN\\bin;C:\\Program Files (x86)\\Skype\\Phone\" x86_64-pc-windows-gnu/test/run-pass\\bare-fn-implements-fn-mut.stage1-x86_64-pc-windows-gnu.exe\r\nstdout:\r\n------------------------------------------\r\nhello\r\n\r\n------------------------------------------\r\nstderr:\r\n------------------------------------------\r\nthread '<main>' panicked at 'assertion failed: `(left == right)` (left: `\"\\u{226}oo\\u{222}ar\"`, right: `\"foobar\"`)', C:/msys64/home/we/rust/src/test/run-pass/bare-fn-implements-fn-mut.rs:35\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n\r\n------------------------------------------\r\n\r\nthread '[run-pass] �run-pass\\bare-fn-implements-fn-mut.rs' panicked at 'explicit panic', C:/msys64/home/we/rust/src/compiletest\\runtest.rs:1667\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n\r\n\r\nfailures:\r\n    [run-pass] ▒run-pass\\bare-fn-implements-fn-mut.rs\r\n\r\ntest result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured\r\n\r\nthread '<main>' panicked at 'Some tests failed', C:/msys64/home/we/rust/src/compiletest/compiletest.rs:242\r\n/home/we/rust/mk/tests.mk:748: recipe for target 'tmp/check-stage1-T-x86_64-pc-windows-gnu-H-x86_64-pc-windows-gnu-rpass.ok' failed\r\nmake: *** [tmp/check-stage1-T-x86_64-pc-windows-gnu-H-x86_64-pc-windows-gnu-rpass.ok] Error 101\r\n```"}}