Skip to content

rustc crashes with stack overflow on recursive imports #8042

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

Closed
stepancheg opened this issue Jul 25, 2013 · 1 comment
Closed

rustc crashes with stack overflow on recursive imports #8042

stepancheg opened this issue Jul 25, 2013 · 1 comment

Comments

@stepancheg
Copy link
Contributor

File aaa.rs:

mod aaa;

rustc aaa.rs works for several seconds and then aborts (on OSX) with stack overflow:

...
#328 0x00000001008a6801 in parse::parser::__extensions__::meth_24625::parse_items_and_view_items::_72be68b85428053::_0$x2e7 ()
#329 0x00000001008ab89d in parse::parser::__extensions__::meth_24892::parse_mod_items::_e6c0deaced10d9ab::_0$x2e7 ()
#330 0x00000001008ad1af in parse::parser::__extensions__::meth_24922::eval_src_mod::_82df5847eb331868::_0$x2e7 ()
#331 0x000000010089d6b5 in parse::parser::__extensions__::meth_24602::parse_item_or_view_item::_b95d6df28da32bb::_0$x2e7 ()
#332 0x00000001008a6801 in parse::parser::__extensions__::meth_24625::parse_items_and_view_items::_72be68b85428053::_0$x2e7 ()
#333 0x00000001008ab89d in parse::parser::__extensions__::meth_24892::parse_mod_items::_e6c0deaced10d9ab::_0$x2e7 ()
#334 0x00000001008ad1af in parse::parser::__extensions__::meth_24922::eval_src_mod::_82df5847eb331868::_0$x2e7 ()
#335 0x000000010089d6b5 in parse::parser::__extensions__::meth_24602::parse_item_or_view_item::_b95d6df28da32bb::_0$x2e7 ()
#336 0x00000001008a6801 in parse::parser::__extensions__::meth_24625::parse_items_and_view_items::_72be68b85428053::_0$x2e7 ()
#337 0x00000001008ab89d in parse::parser::__extensions__::meth_24892::parse_mod_items::_e6c0deaced10d9ab::_0$x2e7 ()
#338 0x00000001008ad1af in parse::parser::__extensions__::meth_24922::eval_src_mod::_82df5847eb331868::_0$x2e7 ()
#339 0x000000010089d6b5 in parse::parser::__extensions__::meth_24602::parse_item_or_view_item::_b95d6df28da32bb::_0$x2e7 ()
#340 0x000000010097df3e in __morestack ()
...
@huonw
Copy link
Member

huonw commented Jul 25, 2013

Hi @stepancheg, thanks for the bug report! However, you've been scooped: this was recently fixed in master (in 3c5cfdf).

@huonw huonw closed this as completed Jul 25, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 17, 2021
Peel blocks and statements utils

changelog: none

* Rename `remove_blocks` to `peel_blocks`
* Add `peel_blocks_and_stmts`
* Various refactors to use the above utils
* The utils also now check `block.rules`
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