{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/44859","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/44859/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/44859/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/44859/events","html_url":"https://github.com/rust-lang/rust/issues/44859","id":260498835,"node_id":"MDU6SXNzdWUyNjA0OTg4MzU=","number":44859,"title":"RUST_BACKTRACE=1 segfaults on locally compiled programs","user":{"login":"james-darkfox","id":637155,"node_id":"MDQ6VXNlcjYzNzE1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/637155?v=4","gravatar_id":"","url":"https://api.github.com/users/james-darkfox","html_url":"https://github.com/james-darkfox","followers_url":"https://api.github.com/users/james-darkfox/followers","following_url":"https://api.github.com/users/james-darkfox/following{/other_user}","gists_url":"https://api.github.com/users/james-darkfox/gists{/gist_id}","starred_url":"https://api.github.com/users/james-darkfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/james-darkfox/subscriptions","organizations_url":"https://api.github.com/users/james-darkfox/orgs","repos_url":"https://api.github.com/users/james-darkfox/repos","events_url":"https://api.github.com/users/james-darkfox/events{/privacy}","received_events_url":"https://api.github.com/users/james-darkfox/received_events","type":"User","site_admin":false},"labels":[{"id":203130,"node_id":"MDU6TGFiZWwyMDMxMzA=","url":"https://api.github.com/repos/rust-lang/rust/labels/A-debuginfo","name":"A-debuginfo","color":"d7e102","default":false},{"id":650731663,"node_id":"MDU6TGFiZWw2NTA3MzE2NjM=","url":"https://api.github.com/repos/rust-lang/rust/labels/C-bug","name":"C-bug","color":"f5f1fd","default":false},{"id":100522,"node_id":"MDU6TGFiZWwxMDA1MjI=","url":"https://api.github.com/repos/rust-lang/rust/labels/I-crash","name":"I-crash","color":"e10c02","default":false},{"id":123110,"node_id":"MDU6TGFiZWwxMjMxMTA=","url":"https://api.github.com/repos/rust-lang/rust/labels/O-linux","name":"O-linux","color":"6e6ec0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2017-09-26T05:51:22Z","updated_at":"2018-09-20T15:35:32Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"`RUST_BACKTRACE=1` segfaults on locally compiled programs when they panic. Externally built binaries such as those installed through rustup work as expected, yielding the ICE backtrace in #44858 .\r\n\r\nI use [Exherbo Linux](https://exherbo.org). I can use `-C panic=abort` to get traces from `gdb`, but that forbids anything graceful.\r\n\r\n```rust\r\nfn main() {\r\n  panic!(\"test\")\r\n}\r\n```\r\n```\r\nthread 'main' panicked at 'test', segfault.rs:2:4\r\nSegmentation fault (core dumped)\r\n```\r\n```\r\nGNU gdb (GDB) 8.0\r\nCopyright (C) 2017 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\r\nand \"show warranty\" for details.\r\nThis GDB was configured as \"x86_64-pc-linux-gnu\".\r\nType \"show configuration\" for configuration details.\r\nFor bug reporting instructions, please see:\r\n<http://www.gnu.org/software/gdb/bugs/>.\r\nFind the GDB manual and other documentation resources online at:\r\n<http://www.gnu.org/software/gdb/documentation/>.\r\nFor help, type \"help\".\r\nType \"apropos word\" to search for commands related to \"word\"...\r\nReading symbols from segfault...done.\r\n(gdb) run\r\nStarting program: /segfault\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/usr/x86_64-pc-linux-gnu/lib/libthread_db.so.1\".\r\nthread 'main' panicked at 'test', segfault.rs:2:4\r\n\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x00007f4abc952e96 in strlen () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6\r\n(gdb) bt\r\n#0  0x00007f4abc952e96 in strlen () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6\r\n#1  0x0000000100009378 in std::ffi::c_str::CStr::from_ptr () at /checkout/src/libstd/ffi/c_str.rs:749\r\n#2  std::sys_common::gnu::libbacktrace::resolve_symname<closure> () at /checkout/src/libstd/sys_common/gnu/libbacktrace.rs:89\r\n#3  std::sys::imp::backtrace::printing::resolve_symname<closure> () at /checkout/src/libstd/sys/unix/backtrace/printing/mod.rs:36\r\n#4  std::sys_common::backtrace::filter_frames::{{closure}} () at /checkout/src/libstd/sys_common/backtrace.rs:110\r\n#5  core::slice::{{impl}}::position::{{closure}}<std::sys_common::backtrace::Frame,closure> () at /checkout/src/libcore/slice/mod.rs:1201\r\n#6  0x000000010000c9e1 in core::slice::Iter<std::sys_common::backtrace::Frame>::search_while<std::sys_common::backtrace::Frame,core::option::Option<usize>,closure> () at /checkout/src/libcore/slice/mod.rs:1268\r\n#7  core::slice::{{impl}}::position<std::sys_common::backtrace::Frame,closure> () at /checkout/src/libcore/slice/mod.rs:1200\r\n#8  std::sys_common::backtrace::filter_frames () at /checkout/src/libstd/sys_common/backtrace.rs:108\r\n#9  std::sys_common::backtrace::_print () at /checkout/src/libstd/sys_common/backtrace.rs:73\r\n#10 0x00000001000114e4 in std::sys_common::backtrace::print () at /checkout/src/libstd/sys_common/backtrace.rs:60\r\n#11 std::panicking::default_hook::{{closure}} () at /checkout/src/libstd/panicking.rs:381\r\n#12 0x0000000100011253 in std::panicking::default_hook () at /checkout/src/libstd/panicking.rs:397\r\n#13 0x00000001000118e8 in std::panicking::rust_panic_with_hook () at /checkout/src/libstd/panicking.rs:577\r\n#14 0x0000000100007082 in std::panicking::begin_panic ()\r\n#15 0x000000010000761b in segfault::main ()\r\n#16 0x0000000100042fdd in panic_unwind::__rust_maybe_catch_panic () at /checkout/src/libpanic_unwind/lib.rs:99\r\n#17 0x0000000100011eac in std::panicking::try<(),closure> () at /checkout/src/libstd/panicking.rs:459\r\n#18 std::panic::catch_unwind<closure,()> () at /checkout/src/libstd/panic.rs:361\r\n#19 std::rt::lang_start () at /checkout/src/libstd/rt.rs:59\r\n#20 0x000000010000764a in main ()\r\n(gdb) q\r\nA debugging session is active.\r\n\r\n        Inferior 1 [process 3744] will be killed.\r\n\r\nQuit anyway? (y or n) y\r\n```\r\n```\r\nrustc 1.22.0-nightly (26015da01 2017-09-23)\r\nLinux 4.12.7 x86_64 GNU/Linux\r\n```"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/423229504","html_url":"https://github.com/rust-lang/rust/issues/44859#issuecomment-423229504","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/44859","id":423229504,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzIyOTUwNA==","user":{"login":"yangby-cryptape","id":30993023,"node_id":"MDQ6VXNlcjMwOTkzMDIz","avatar_url":"https://avatars1.githubusercontent.com/u/30993023?v=4","gravatar_id":"","url":"https://api.github.com/users/yangby-cryptape","html_url":"https://github.com/yangby-cryptape","followers_url":"https://api.github.com/users/yangby-cryptape/followers","following_url":"https://api.github.com/users/yangby-cryptape/following{/other_user}","gists_url":"https://api.github.com/users/yangby-cryptape/gists{/gist_id}","starred_url":"https://api.github.com/users/yangby-cryptape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangby-cryptape/subscriptions","organizations_url":"https://api.github.com/users/yangby-cryptape/orgs","repos_url":"https://api.github.com/users/yangby-cryptape/repos","events_url":"https://api.github.com/users/yangby-cryptape/events{/privacy}","received_events_url":"https://api.github.com/users/yangby-cryptape/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T15:35:32Z","updated_at":"2018-09-20T15:35:32Z","author_association":"NONE","body":"I test `rustc 1.29.0 (aa3ca1994 2018-09-11)` and `rustc 1.30.0-nightly (20dc0c507 2018-09-19)`, the problem is still existed."}}
{"actor":{"display_login":"yangby-cryptape"}}