Closed
Description
maybe_cc
in rust_cc.cpp
contains this:
// FIXME: Needs a snapshot.
#if 0
if (task->cc_counter++ > RUST_CC_FREQUENCY) {
task->cc_counter = 0;
do_cc(task);
}
#endif
Removing the #if
causes the stage1 compiler to crash with the following backtrace:
#0 0x00007ffff6026d05 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff602aab6 in *__GI_abort () at abort.c:92
#2 0x00007ffff69d7b5c in walk_vec2 (is_pod=<optimized out>, this=0x7ffff3f1b950, sp_size=<optimized out>) at ./src/rt/rust_cc.cpp:315
#3 walk_vec1 (sp_size=5, is_pod=true, this=0x7ffff3f1b950) at ./src/rt/rust_shape.h:878
#4 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_vec0 (this=0x7ffff3f1b950) at ./src/rt/rust_shape.h:440
#5 0x00007ffff69d763e in walk_box_contents2 (box_dp=..., sub=..., this=<optimized out>) at ./src/rt/rust_cc.cpp:383
#6 shape::data<cc::mark, shape::ptr>::walk_box_contents1 (this=<optimized out>) at ./src/rt/rust_shape.h:947
#7 0x00007ffff69d77b2 in walk_box2 (this=0x7ffff3f1ba10) at ./src/rt/rust_cc.cpp:330
#8 walk_iface2 (this=0x7ffff3f1ba10) at ./src/rt/rust_cc.cpp:363
#9 walk_iface1 (this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:895
#10 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk (this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:381
#11 0x00007ffff69d7b88 in walk_struct2 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1ba10) at ./src/rt/rust_cc.cpp:388
#12 walk_struct1 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:874
#13 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_struct0 (this=0x7ffff3f1ba10) at ./src/rt/rust_shape.h:510
#14 0x00007ffff69d763e in walk_box_contents2 (box_dp=..., sub=..., this=<optimized out>) at ./src/rt/rust_cc.cpp:383
#15 shape::data<cc::mark, shape::ptr>::walk_box_contents1 (this=<optimized out>) at ./src/rt/rust_shape.h:947
#16 0x00007ffff69d767e in walk_box2 (this=0x7ffff3f1bad0) at ./src/rt/rust_cc.cpp:330
#17 walk_box1 (this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:881
#18 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_box0 (this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:488
#19 0x00007ffff69d7b88 in walk_struct2 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1bad0) at ./src/rt/rust_cc.cpp:388
#20 walk_struct1 (end_sp=0x7ffff7443c5d "\r\016", this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:874
#21 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_struct0 (this=0x7ffff3f1bad0) at ./src/rt/rust_shape.h:510
#22 0x00007ffff69d763e in walk_box_contents2 (box_dp=..., sub=..., this=<optimized out>) at ./src/rt/rust_cc.cpp:383
#23 shape::data<cc::mark, shape::ptr>::walk_box_contents1 (this=<optimized out>) at ./src/rt/rust_shape.h:947
#24 0x00007ffff69d767e in walk_box2 (this=0x7ffff3f1bba0) at ./src/rt/rust_cc.cpp:330
#25 walk_box1 (this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:881
#26 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_box0 (this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:488
#27 0x00007ffff69d7b88 in walk_struct2 (end_sp=0x7ffff7443c6f "", this=0x7ffff3f1bba0) at ./src/rt/rust_cc.cpp:388
#28 walk_struct1 (end_sp=0x7ffff7443c6f "", this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:874
#29 shape::ctxt<shape::data<cc::mark, shape::ptr> >::walk_struct0 (this=0x7ffff3f1bba0) at ./src/rt/rust_shape.h:510
#30 0x00007ffff69d683f in cc::mark::do_mark (task=0x626170, roots=..., marked=...) at ./src/rt/rust_cc.cpp:444
#31 0x00007ffff69d6e31 in cc::do_cc (task=0x626170) at ./src/rt/rust_cc.cpp:654
#32 0x00007ffff69c84b8 in upcall_s_malloc (args=0x6551d0) at ./src/rt/rust_upcall.cpp:126
#33 0x00007ffff69dc139 in __morestack () from /home/marijn/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so
#34 0x00007ffff69c8878 in call_shim_on_c_stack (fn_ptr=0x7ffff69c8450, args=0x6551d0, this=<optimized out>) at ./src/rt/arch/x86_64/context.h:59
#35 call_upcall_on_c_stack (fn_ptr=0x7ffff69c8450, args=0x6551d0) at ./src/rt/rust_upcall.cpp:52
#36 upcall_malloc (td=<optimized out>) at ./src/rt/rust_upcall.cpp:144
#37 0x00007ffff71be06b in syntax::parse::parser::mk_expr::_6c35a4f2e274aebe ()
from /home/marijn/src/rust/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so
#38 0x00007ffff71be9d2 in syntax::parse::parser::mk_pexpr::_f82e5d709d2cbe83 ()
[more]