Skip to content

Segfault matching copy of dereferenced owned string #4542

Closed
@jdm

Description

@jdm
fn main() {
    for os::args().each |arg| {
        match copy *arg {
            s => { }
        }
    }
}
#0  0x000000395a835935 in raise () from /lib64/libc.so.6
#1  0x000000395a8370e8 in abort () from /lib64/libc.so.6
#2  0x000000395a874e8b in __libc_message () from /lib64/libc.so.6
#3  0x000000395a87c00e in _int_free () from /lib64/libc.so.6
#4  0x00007ffff7dae669 in __morestack () from /tmp/../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so
#5  0x00007ffff7d9dc68 in call_on_c_stack (fn_ptr=0x7ffff7d9cb70, args=0x7ffff0101650, this=0x407180) at /run/media/jdm/ssd/rust/src/rt/rust_task.h:494
#6  call_upcall_on_c_stack (fn_ptr=0x7ffff7d9cb70, args=0x7ffff0101650, task=<optimized out>) at /run/media/jdm/ssd/rust/src/rt/rust_upcall.cpp:45
#7  upcall_exchange_free (ptr=<optimized out>) at /run/media/jdm/ssd/rust/src/rt/rust_upcall.cpp:208
#8  0x0000000000401d7f in glue_free_1939 ()
#9  0x00000000004021c7 in main::anon::expr_fn_1955 ()
#10 0x000000000040175b in vec::__extensions__::each_1861::anon::expr_fn_1914 ()
#11 0x0000000000401472 in vec::each_1864::anon::expr_fn_1894 ()
#12 0x00000000004011a2 in vec::as_imm_buf_1867::_43d6e68cf6296159::_00 ()
#13 0x00000000004022b4 in __morestack ()
#14 0x0000000000401087 in vec::each_1864::_83f0fe0dda0fc51::_00 ()
#15 0x0000000000400fe5 in vec::__extensions__::each_1861::_a7cec32bfdc93c6::_00 ()
#16 0x0000000000401f83 in main::_fe18229bb2f275::_00 ()
#17 0x000000000040203e in _rust_main ()
#18 0x00007ffff7d9b4e4 in task_start_wrapper (a=0x407fd0) at /run/media/jdm/ssd/rust/src/rt/rust_task.cpp:164
#19 0x0000000000000000 in ?? ()

Metadata

Metadata

Assignees

Labels

A-codegenArea: Code generationI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions