Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

[ICE] reached unreachable: bug in const_fold or parser #291

@Byter09

Description

@Byter09

Expected behavior

Possibly an error? Not sure.

Actual Behavior

The application panicked (crashed).
Message:  internal error: entered unreachable code: bug in const_fold or parser: cpp cond should be boolean
Location: src/lex/cpp.rs:605

Code

#if!F?"":!a
Backtrace
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                          (5 post panic frames hidden)                          
 5: rcc::lex::cpp::PreProcessor::boolean_expr::hb14924dc1e2aa075
    at src/lex/cpp.rs:605
 6: rcc::lex::cpp::PreProcessor::directive::h1d36c2bd1020b8e4
    at src/lex/cpp.rs:395
 7: <rcc::lex::cpp::PreProcessor as core::iter::traits::iterator::Iterator>::next::hfca8c81831b50c63
    at src/lex/cpp.rs:136
 8: rcc::compile::h53a76de88b04a7fa
    at src/lib.rs:156
 9: rcc::real_main::hae5b7d98d318c138
    at src/main.rs:109
10: rcc::main::h4220d37df2ab27ea
    at src/main.rs:176
File, fresh from the fuzzer:

SIGABRT.PC.7ffff7dee7bb.STACK.b8fd143c.CODE.-6.ADDR.(nil).INSTR.mov____0x108(%rsp),%rcx.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    ICEInternal Compiler Error (panic)bugSomething isn't workingpreprocessorIssue in the preprocessor (probably cycle detection)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions