Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc ICE with typoed path to enum constructor in alt #1699

Closed
jwise opened this issue Jan 29, 2012 · 2 comments
Closed

rustc ICE with typoed path to enum constructor in alt #1699

jwise opened this issue Jan 29, 2012 · 2 comments

Comments

@jwise
Copy link
Contributor

jwise commented Jan 29, 2012

fn main() {
  alt core::option::none {
    core::option::none() { }
    core::optn::some() { }
  }
}

Results in a crash (after a perfectly reasonable error message):

joshua@escape:~/rust/rlambda$ RUST_LOG=rustc=0,::rt::backtrace rustc smash.rs
smash.rs:4:4: 4:20 error: unresolved modulename: optn
smash.rs:4     core::optn::some() { }
               ^~~~~~~~~~~~~~~~
rust: upcall fail 'option none', src/libcore/option.rs:34
0   librustrt.dylib                     0x0000000103235a19 __morestack + 9
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', src/comp/driver/rustc.rs:176
0   librustrt.dylib                     0x0000000103235a19 __morestack + 9
rust: domain main @0x7ff23081a000 root task failed

This was tested with rustc 0.1. Building from HEAD on nyus now to try to get a more helpful backtrace and to verify that it hasn't since been fixed.

@jwise
Copy link
Contributor Author

jwise commented Jan 29, 2012

Here's a more helpful backtrace. Repros at 2ca0b37.

joshua@nyus:~/rust/build$ RUST_LOG=rustc=0,::rt::backtrace !!
RUST_LOG=rustc=0,::rt::backtrace rustc smash.rs
smash.rs:4:4: 4:20 error: unresolved modulename: optn
smash.rs:4     core::optn::some() { }
               ^~~~~~~~~~~~~~~~
rust: upcall fail 'option none', ../src/libcore/option.rs:34
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7fd54306a9f5]
/usr/local/bin/../lib/librustrt.so(+0x33119)[0x7fd543081119]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x39)[0x7fd54306dec9]
/usr/local/bin/../lib/libcore-14bd852465126fe7-0.1.so(_ZN6option3get17_e9fe5bbdaa8f1343E+0xb4)[0x7fd543ebded4]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve13resolve_names8walk_pat17_df5733ccc384791dE+0x1d3)[0x7fd54365e183]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve20visit_arm_with_scope17_a3ffd851e87a2377E+0x81)[0x7fd54365fed1]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax5visit10visit_expr17_2191d7c991221f0bE+0x7e3)[0x7fd5436fb3c3]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve21visit_expr_with_scope17_3a65aad0de13a35eE+0x1da)[0x7fd54366023a]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve13resolve_names9walk_expr17_222d86f3ff88133eE+0x4d)[0x7fd54365dafd]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve22visit_block_with_scope17_ee5d1a2a4be1e211E+0x2d9)[0x7fd54365fc29]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax5visit8visit_fn17_caa06b313b8ad9b4E+0xe7)[0x7fd5436fa6b7]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve19visit_fn_with_scope17_a811fd977ead6f7eE+0x745)[0x7fd54365f8d5]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(+0x2b3494)[0x7fd5437eb494]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax5visit10visit_item17_5c3aa7827bc98c1fE+0x184)[0x7fd5436f96e4]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve21visit_item_with_scope17_cf55e0e4dfaaafecE+0xa8a)[0x7fd54365ef1a]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(+0x304318)[0x7fd54383c318]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax5visit9visit_mod17_24466afaa9e1a8b7E+0xca)[0x7fd5436f944a]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(+0x2de702)[0x7fd543816702]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve13resolve_names17_e9f61c552e89e646E+0x41a)[0x7fd54365d91a]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle7resolve13resolve_crate17_c4c27222d2158d0aE+0x2fa)[0x7fd54365ab3a]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6driver6driver4time17_6224b963f79affc8E+0x8c)[0x7fd5437a843c]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6driver6driver12compile_upto17_bd712d43acc149bfE+0x957)[0x7fd5437a9677]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(+0x304318)[0x7fd54383c318]
/usr/local/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6driver6driver13compile_input17_7c468f6ed9ece9faE+0xc2)[0x7fd5437aac62]
rustc[0x405116]
rustc[0x407918]
rustc[0x40745a]
rustc[0x406f5e]
/usr/local/bin/../lib/libcore-14bd852465126fe7-0.1.so(+0x40452)[0x7fd543ecd452]
/usr/local/bin/../lib/librustrt.so(task_start_wrapper+0x32)[0x7fd543069bd2]
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', ../src/comp/driver/rustc.rs:175
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7fd54306a9f5]
/usr/local/bin/../lib/librustrt.so(+0x33119)[0x7fd543081119]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x39)[0x7fd54306dec9]
rustc[0x4054c2]
rustc[0x4056fc]
/usr/local/bin/../lib/librustrt.so(task_start_wrapper+0x32)[0x7fd543069bd2]
rust: domain main @0x1ed1c80 root task failed

@jdm
Copy link
Contributor

jdm commented Jan 29, 2012

Looks exactly like #1697 to me.

@jdm jdm closed this as completed Jan 29, 2012
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 11, 2023
Update books

## rust-lang/edition-guide

1 commits in 2751bdcef125468ea2ee006c11992cd1405aebe5..34fca48ed284525b2f124bf93c51af36d6685492
2023-09-06 20:34:00 UTC to 2023-09-06 20:34:00 UTC

- Update Rust 2018 "Path and module system changes" for Rust 1.72 (rust-lang/edition-guide#285)

## rust-lang/nomicon

2 commits in 388750b081c0893c275044d37203f97709e058ba..e3f3af69dce71cd37a785bccb7e58449197d940c
2023-09-11 15:57:05 UTC to 2023-09-11 15:55:35 UTC

- specify which integer overflows we mean (rust-lang/nomicon#419)
- remove 'fail to call destructors' from okay-list (rust-lang/nomicon#420)

## rust-lang/reference

4 commits in d43038932adeb16ada80e206d4c073d851298101..ee7c676fd6e287459cb407337652412c990686c0
2023-09-09 20:08:06 UTC to 2023-08-16 16:59:33 UTC

- Specify bit validity and padding of some types (rust-lang/reference#1392)
- implementations.md typo fix (rust-lang/reference#1399)
- Update section on default layout for `repr(Rust)` (rust-lang/reference#1396)
- conditional-compilation.md: Mention the "none" target_os value (rust-lang/reference#1395)

## rust-lang/rust-by-example

4 commits in 07e0df2f006e59d171c6bf3cafa9d61dbeb520d8..c954202c1e1720cba5628f99543cc01188c7d6fc
2023-08-22 18:49:29 UTC to 2023-08-22 18:46:56 UTC

- Improve transparency of 5_i32 versus 5i32 (rust-lang/rust-by-example#1707)
- Removed redundant comma (rust-lang/rust-by-example#1735)
- Fixed link to Functions (rust-lang/rust-by-example#1734)
- Pedantic `'static` lifetime corrections (rust-lang/rust-by-example#1732)

## rust-lang/rustc-dev-guide

25 commits in b123ab4754127d822ffb38349ce0fbf561f1b2fd..08bb147d51e815b96e8db7ba4cf870f201c11ff8
2023-09-11 10:36:36 UTC to 2023-08-18 21:13:31 UTC

- make link more pleasant to eye too (rust-lang/rustc-dev-guide#1778)
- The current playground link used in the page of MIR shows a optimized… (rust-lang/rustc-dev-guide#1789)
- Add section about building an optimized version of `rustc` (rust-lang/rustc-dev-guide#1787)
- Set max line length in `.editorconfig` to 100 (rust-lang/rustc-dev-guide#1788)
- Update minor how-to-build-and-run.md spelling mistake (rust-lang/rustc-dev-guide#1785)
- add sections in 'using git' (rust-lang#1675) (rust-lang/rustc-dev-guide#1784)
- link std-dev-guide from landing page (rust-lang#1699) (rust-lang/rustc-dev-guide#1783)
- Reword sentence about using `./x` over `./x.py` (rust-lang/rustc-dev-guide#1782)
- remove (excessive) indentation (rust-lang/rustc-dev-guide#1781)
- coverage tests have moved, twice (rust-lang/rustc-dev-guide#1780)
- remove extraneous word (rust-lang/rustc-dev-guide#1779)
- llvm updates (rust-lang/rustc-dev-guide#1761)
- make link more pleasant to eye (rust-lang/rustc-dev-guide#1777)
- date-check: test suites/classes using "revisions" (rust-lang/rustc-dev-guide#1738)
- share link target (rust-lang/rustc-dev-guide#1740)
- indicate full hierarchy of config option (rust-lang/rustc-dev-guide#1776)
- remove stray word (rust-lang/rustc-dev-guide#1773)
- it is lower-case (rust-lang/rustc-dev-guide#1772)
- Suggest enabling patch-binaries-for-nix in `shell.nix` (rust-lang/rustc-dev-guide#1774)
- Add additional licensing concerns to docs (rust-lang/rustc-dev-guide#1775)
- Fix broken MD link format (rust-lang/rustc-dev-guide#1771)
- update internal terminology: Substs -> GenericArgs (rust-lang/rustc-dev-guide#1769)
- Update suggested.md : missing word (rust-lang/rustc-dev-guide#1770)
- Update outdated doc for types (rust-lang/rustc-dev-guide#1768)
- Add dropck documentation (rust-lang/rustc-dev-guide#1767)
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Sep 11, 2023
Rollup merge of rust-lang#115761 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/edition-guide

1 commits in 2751bdcef125468ea2ee006c11992cd1405aebe5..34fca48ed284525b2f124bf93c51af36d6685492
2023-09-06 20:34:00 UTC to 2023-09-06 20:34:00 UTC

- Update Rust 2018 "Path and module system changes" for Rust 1.72 (rust-lang/edition-guide#285)

## rust-lang/nomicon

2 commits in 388750b081c0893c275044d37203f97709e058ba..e3f3af69dce71cd37a785bccb7e58449197d940c
2023-09-11 15:57:05 UTC to 2023-09-11 15:55:35 UTC

- specify which integer overflows we mean (rust-lang/nomicon#419)
- remove 'fail to call destructors' from okay-list (rust-lang/nomicon#420)

## rust-lang/reference

4 commits in d43038932adeb16ada80e206d4c073d851298101..ee7c676fd6e287459cb407337652412c990686c0
2023-09-09 20:08:06 UTC to 2023-08-16 16:59:33 UTC

- Specify bit validity and padding of some types (rust-lang/reference#1392)
- implementations.md typo fix (rust-lang/reference#1399)
- Update section on default layout for `repr(Rust)` (rust-lang/reference#1396)
- conditional-compilation.md: Mention the "none" target_os value (rust-lang/reference#1395)

## rust-lang/rust-by-example

4 commits in 07e0df2f006e59d171c6bf3cafa9d61dbeb520d8..c954202c1e1720cba5628f99543cc01188c7d6fc
2023-08-22 18:49:29 UTC to 2023-08-22 18:46:56 UTC

- Improve transparency of 5_i32 versus 5i32 (rust-lang/rust-by-example#1707)
- Removed redundant comma (rust-lang/rust-by-example#1735)
- Fixed link to Functions (rust-lang/rust-by-example#1734)
- Pedantic `'static` lifetime corrections (rust-lang/rust-by-example#1732)

## rust-lang/rustc-dev-guide

25 commits in b123ab4754127d822ffb38349ce0fbf561f1b2fd..08bb147d51e815b96e8db7ba4cf870f201c11ff8
2023-09-11 10:36:36 UTC to 2023-08-18 21:13:31 UTC

- make link more pleasant to eye too (rust-lang/rustc-dev-guide#1778)
- The current playground link used in the page of MIR shows a optimized… (rust-lang/rustc-dev-guide#1789)
- Add section about building an optimized version of `rustc` (rust-lang/rustc-dev-guide#1787)
- Set max line length in `.editorconfig` to 100 (rust-lang/rustc-dev-guide#1788)
- Update minor how-to-build-and-run.md spelling mistake (rust-lang/rustc-dev-guide#1785)
- add sections in 'using git' (rust-lang#1675) (rust-lang/rustc-dev-guide#1784)
- link std-dev-guide from landing page (rust-lang#1699) (rust-lang/rustc-dev-guide#1783)
- Reword sentence about using `./x` over `./x.py` (rust-lang/rustc-dev-guide#1782)
- remove (excessive) indentation (rust-lang/rustc-dev-guide#1781)
- coverage tests have moved, twice (rust-lang/rustc-dev-guide#1780)
- remove extraneous word (rust-lang/rustc-dev-guide#1779)
- llvm updates (rust-lang/rustc-dev-guide#1761)
- make link more pleasant to eye (rust-lang/rustc-dev-guide#1777)
- date-check: test suites/classes using "revisions" (rust-lang/rustc-dev-guide#1738)
- share link target (rust-lang/rustc-dev-guide#1740)
- indicate full hierarchy of config option (rust-lang/rustc-dev-guide#1776)
- remove stray word (rust-lang/rustc-dev-guide#1773)
- it is lower-case (rust-lang/rustc-dev-guide#1772)
- Suggest enabling patch-binaries-for-nix in `shell.nix` (rust-lang/rustc-dev-guide#1774)
- Add additional licensing concerns to docs (rust-lang/rustc-dev-guide#1775)
- Fix broken MD link format (rust-lang/rustc-dev-guide#1771)
- update internal terminology: Substs -> GenericArgs (rust-lang/rustc-dev-guide#1769)
- Update suggested.md : missing word (rust-lang/rustc-dev-guide#1770)
- Update outdated doc for types (rust-lang/rustc-dev-guide#1768)
- Add dropck documentation (rust-lang/rustc-dev-guide#1767)
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Co-authored-by: Ted Kaminski <tedinski@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants