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

attempting to tokenize lots of open parens results in a stack overflow #55

Closed
frewsxcv opened this issue Jan 16, 2018 · 2 comments
Closed

Comments

@frewsxcv
Copy link

https://gist.github.com/frewsxcv/3b427948da01685c95c26ab4a005c337

> cargo run
   Compiling proc-macro2-foo v0.1.0 (file:///private/tmp/proc-macro2-foo)
    Finished dev [unoptimized + debuginfo] target(s) in 2.4 secs
     Running `target/debug/proc-macro2-foo`

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
fish: 'cargo run' terminated by signal SIGABRT (Abort)

found via afl.rs

@frewsxcv frewsxcv changed the title attempting to tokenize lots of opeen parens results in a stack overflow attempting to tokenize lots of open parens results in a stack overflow Jan 16, 2018
@dtolnay
Copy link
Owner

dtolnay commented Jan 16, 2018

Looks like rustc has the same behavior as of 1.25.0-nightly.

fn main() {
    let s = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...
}
thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
error: Could not compile `playground`.

To learn more, run the command again with --verbose.

@dtolnay
Copy link
Owner

dtolnay commented Mar 29, 2021

Fixed by #231 + #232.

@dtolnay dtolnay closed this as completed Mar 29, 2021
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