Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc: Work around a segmentation fault
On Linux/Mac, I got a segmentation fault: (gdb) bt #0 0x00000000007519af in glue_take584 () rust-lang#1 0x00000000006d4bec in back::rpath::get_rpath_flags::_3899df2ca513c603 () rust-lang#2 0x00000000006c7655 in back::link::link_binary::_7afde00a9791031c () rust-lang#3 0x00000000007d3ff5 in driver::rustc::compile_input::thunk9212 () rust-lang#4 0x0000000000710f24 in driver::rustc::time::_3e691b2a4ba58aee () rust-lang#5 0x000000000071a79d in driver::rustc::compile_input::_7b4a41b87c18e034 () rust-lang#6 0x000000000072f0a9 in driver::rustc::main::_cd8b8c8185af3dee () rust-lang#7 0x000000000072f1ed in _rust_main () rust-lang#8 0x00007ffff7e6e146 in task_start_wrapper (a=<optimized out>) at ../src/rt/rust_task.cpp:176 The variable `output` or `out_filename` becomes (null) after the definition of `fn unlib`. Move the function defintion to the beginning seems prevent the crash on Linux.
- Loading branch information