Closed
Description
trait M {
fn m(self) -> Self;
}
impl M for ~int {
fn m(self) -> ~int {
self
}
}
fn main() {
(~1).m();
}
This crashes in free().
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7f85700 (LWP 10508)]
__GI___libc_free (mem=0xffffffffffffffff) at malloc.c:2892
2892 malloc.c: No such file or directory.
(gdb) bt
#0 __GI___libc_free (mem=0xffffffffffffffff) at malloc.c:2892
#1 0x00007ffff7a5b859 in libc::funcs::c95::stdlib::free::_e26c3f5a54e72c6::_07pre () from /home/bs/src/rust/../../rust/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#2 0x0000000000404f38 in ?? ()
#3 0x00007ffff7ae8bdc in __morestack () from /home/bs/src/rust/../../rust/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#4 0x0000000000000000 in ?? ()