graydon/rust — Issue #1236: rustc: 'option none' at src/lib/option.rs:34
Author: elly
Created: 2011-12-01 02:58:38+00:00
State: open

The following code crashes rustc @ b4c53627b17024a51b60243f6d27cd1d3a9a9724 (2011-11-30):

use rustc;

import rustc::syntax::codemap;
import rustc::syntax::parse::parser;

fn load_pkg(filename: str) {
let sess = @{cm: codemap::new_codemap(), mutable next_id: 0};
let c = parser::parse_crate_from_crate_file(filename, [], sess);
}

fn main(argv: [str]) { }

Stack trace:
```#0 upcall_fail (expr=0x835d5a8 "option none", file=0xf7f93da0 "src/lib/option.rs", line=34)
at ./src/rt/rust_upcall.cpp:53
No locals.
#1 0xf7f5d3e4 in option::get::_454749d0d11b4fbf () from /home/elly/a/rust/bin/../lib/libruststd.so
No symbol table info available.
#2 0x0822be08 in metadata::decoder::get_tag_variants::_c368dee6e6811179 ()
No symbol table info available.
#3 0x082362a1 in metadata::csearch::get_tag_variants::_e8e716f68cdf7a7a ()
No symbol table info available.
#4 0x080fcdfb in middle::ty::tag_variants::_e8e716f68cdf7a7a ()
No symbol table info available.
#5 0x080eed10 in middle::ty::type_structurally_contains::_d3ecdbc7bfa0c1be ()
No symbol table info available.
#6 0x080eeefb in middle::ty::type_structurally_contains::_d3ecdbc7bfa0c1be ()
No symbol table info available.
#7 0x0806c937 in middle::trans::type_of_tag::_c783f99a0a3b1294 ()
No symbol table info available.
#8 0x0806b7b9 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#9 0x0806c200 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#10 0x0806b872 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#11 0x0806c0a4 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#12 0x0806c200 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#13 0x0806c200 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#14 0x0806b872 in middle::trans::type_of_inner::_30355889c5f72f51 ()
No symbol table info available.
#15 0x0806b200 in middle::trans::type_of_fn::_75bd64deff4296b5 ()
No symbol table info available.
#16 0x0806b612 in middle::trans::type_of_fn_from_ty::_865a599c181364bf ()
No symbol table info available.
#17 0x0806cd85 in middle::trans::type_of_ty_param_kinds_and_ty::_d1f13efbd1979a8e ()
No symbol table info available.
#18 0x08093fe6 in middle::trans::trans_external_path::_327d3072bf76cf95 ()
No symbol table info available.
#19 0x080942c1 in middle::trans::lval_static_fn::_8f45f5f1e545d995 ()
No symbol table info available.
#20 0x080952c2 in middle::trans::trans_var::_363ea6fa0d08f815 ()
No symbol table info available.
#21 0x08095090 in middle::trans::trans_path::_298815bfd9f339b9 ()
No symbol table info available.
#22 0x08098534 in middle::trans::trans_callee::_788f0e9e39d6f4cd ()
No symbol table info available.
#23 0x0809fabc in middle::trans::trans_call::_dfdc8184c03e1476 ()
No symbol table info available.
#24 0x080a5332 in middle::trans::trans_expr::_3781d1b6b7f35ec1 ()
No symbol table info available.
#25 0x080a3cd4 in middle::trans::trans_temp_lval::_ff84ab9c97661aaf ()
No symbol table info available.
#26 0x080ab16c in middle::trans::init_local::_7b5c6bb2b3cc6372 ()
No symbol table info available.
#27 0x080ac144 in middle::trans::trans_stmt::_e593391235b1739c ()
No symbol table info available.
#28 0x080adf42 in middle::trans::trans_block_dps::_132481f5218ad88c ()
No symbol table info available.
#29 0x080b0f52 in middle::trans::trans_closure::_4e2dc8cfee2b2174 ()
No symbol table info available.
#30 0x080b129a in middle::trans::trans_fn::_32f6ca2feaddcd3f ()
No symbol table info available.
#31 0x080b7016 in middle::trans::trans_item::_faf7d233d857cd13 ()
No symbol table info available.
#32 0x080c2438 in middle::trans::trans_crate::_bf32c5bee073659b ()
No symbol table info available.
#33 0x0829a10b in driver::rustc::compile_input::thunk9027 ()
No symbol table info available.
#34 0x082381d9 in driver::rustc::time::_3e691b2a4ba58aee ()
No symbol table info available.
#35 0x0823a61e in driver::rustc::compile_input::_78d69b2f483afec7 ()
No symbol table info available.
#36 0x08243403 in driver::rustc::main::_cd8b8c8185af3dee ()
No symbol table info available.
#37 0x08243acf in _rust_main ()
No symbol table info available.
#38 0xf6ecc894 in task_start_wrapper (a=0xf6bc180c) at ./src/rt/rust_task.cpp:208
task = 0x8341dc0
rval = 42
failed = false
env =
#39 0xdeadbeef in ?? ()
No symbol table info available.
#40 0xf6bc180c in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)```