graydon/rust — Issue #1135: crash: recursive tag with vector -> out of stack space, sorry
Author: elly
Created: 2011-11-05 02:22:43+00:00
State: open

The following code crashes rustc with either an "out of stack space" message or a segmentation fault:

tag x { y([x]); }

Distressingly, attaching gdb to rustc during this event causes gdb itself to dump core if rustc segfaults (!!).

Full stack from the "out of stack space, sorry" case:
#0 check_stack (task=0x832bc10) at ./src/rt/rust_upcall.cpp:21
esp = 0xf68ca000
#1 0xf6e75c83 in upcall_get_type_desc (curr_crate=0x0, size=28, align=1, n_descs=2, descs=0xf68ca0a4,
n_obj_params=0) at ./src/rt/rust_upcall.cpp:146
task = 0x832bc10
__FUNCTION__ = "upcall_get_type_desc"
cache =
td =
#2 0xf7f7d14f in smallintmap::find::_5c9e3cb6b6b5a2f5 ()
from /home/elly/a/rust/bin/../lib/libruststd.so
No symbol table info available.
#3 0x0825f7cc in middle::ast_map::new_smallintmap_adapter::adapter::method::find ()
No symbol table info available.
#4 0x080ec632 in middle::ty::tag_variants::_1c871e1f76d6b2f5 ()
No symbol table info available.
#5 0x080612e6 in middle::trans::type_of_tag::_939525f41f14d95a ()
No symbol table info available.
#6 0x080609b6 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#7 0x08060a71 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#8 0x08061126 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#9 0x0805f869 in middle::trans::type_of::_8e3d2f233d4c6561 ()
No symbol table info available.
#10 0x0806456f in middle::trans::static_size_of_tag::_bdd7cd8c1b3eb325 ()
No symbol table info available.
#11 0x080614f6 in middle::trans::type_of_tag::_939525f41f14d95a ()
No symbol table info available.
#12 0x080609b6 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#13 0x08060a71 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#14 0x08061126 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#15 0x0805f869 in middle::trans::type_of::_8e3d2f233d4c6561 ()
No symbol table info available.
#16 0x0806456f in middle::trans::static_size_of_tag::_bdd7cd8c1b3eb325 ()
No symbol table info available.
#17 0x080614f6 in middle::trans::type_of_tag::_939525f41f14d95a ()
No symbol table info available.
#18 0x080609b6 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#19 0x08060a71 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#20 0x08061126 in middle::trans::type_of_inner::_5ae7d09f421bd3b2 ()
No symbol table info available.
#21 0x0805f869 in middle::trans::type_of::_8e3d2f233d4c6561 ()
No symbol table info available.
#22 0x0806456f in middle::trans::static_size_of_tag::_bdd7cd8c1b3eb325 ()
No symbol table info available.