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

Unhandled panic during parsing #24275

Closed
kmcallister opened this issue Apr 10, 2015 · 2 comments
Closed

Unhandled panic during parsing #24275

kmcallister opened this issue Apr 10, 2015 · 2 comments
Labels
A-parser Area: The parsing of Rust source code to an AST I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@kmcallister
Copy link
Contributor

Found with american fuzzy lop.

fn main() {
    [c||"ted"%; 2]
}
1:2:15: 2:16 error: unexpected token: `;`
1:2     [c||"ted"%; 2]
                  ^
fatal runtime error: Could not unwind stack, error = 5

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7fffef3ff700 (LWP 13149)]
0x00007ffff74972bf in rust_panic () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
(gdb) bt
#0  0x00007ffff74972bf in rust_panic () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
#1  0x00007ffff73cf5bb in rt::unwind::begin_unwind_inner::h01964e4bf420981ehzI () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
#2  0x00007ffff73cf900 in rt::unwind::begin_unwind_fmt::hc10d5bfd6c2d0e48VxI () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
#3  0x00007ffff74973e8 in rust_begin_unwind () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
#4  0x00007ffff74f3b95 in panicking::panic_fmt::h0bca819b6eed914c5jC () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
#5  0x00007ffff74eb3c5 in panicking::panic::he4dce1a833b2e2c2CiC () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libstd-4e7c5e5c.so
#6  0x00007ffff46de9f9 in alloc..rc..Rc$LT$collections..string..String$GT$::drop.50002::h91f7094dcbfb1c94 () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-4e7c5e5c.so
#7  0x00007ffff46debf2 in collections..vec..Vec$LT$util..interner..RcStr$GT$::drop.50119::h14134897e0ba359f () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-4e7c5e5c.so
#8  0x00007ffff46eae0d in alloc..rc..Rc$LT$util..interner..StrInterner$GT$::drop.51510::hd31f6daea199de99 () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-4e7c5e5c.so
#9  0x00007ffff48015ae in thread::__local::imp::destroy_value::h16820672892060373536 () from /home/keegan/rust-master/x86_64-unknown-linux-gnu/stage2/bin/../lib/libsyntax-4e7c5e5c.so
#10 0x00007ffff6f8b1b6 in __GI___call_tls_dtors () at cxa_thread_atexit_impl.c:88
#11 0x00007ffff13dd0b2 in start_thread (arg=0x7fffef3ff700) at pthread_create.c:319
#12 0x00007ffff703904d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Tested on rustc 1.0.0-dev (f207ecb 2015-04-03) (built 2015-04-04). Also happens on play.rust-lang.org

@kmcallister kmcallister added I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics. A-parser Area: The parsing of Rust source code to an AST labels Apr 10, 2015
@arielb1
Copy link
Contributor

arielb1 commented Apr 10, 2015

Does not affect new (e4f9ddb 2015-04-10) rustc.

@kmcallister
Copy link
Contributor Author

Confirmed fixed on rustc 1.0.0-dev (6b95d8b 2015-04-09) (built 2015-04-10).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

2 participants