Skip to content

[BUG] Assertion `std::ssize(preprocessor) > 1' failed. #1170

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
MarekKnapek opened this issue Jul 20, 2024 · 1 comment
Closed

[BUG] Assertion `std::ssize(preprocessor) > 1' failed. #1170

MarekKnapek opened this issue Jul 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MarekKnapek
Copy link

MarekKnapek commented Jul 20, 2024

Steps to reproduce:

  • Get latest cppfront source code.
  • Compile cppfront, g++ -std=c++20 -o cppfront cppfront.cpp.
  • Run cppfront on this test file:
#else#Xt:=private:E##)$##$

Expected result:

  • Compilation success, or nice error message printed.

Actual result:

  • cppfront: io.h:471: void cpp2::braces_tracker::found_pre_else(): Assertion `std::ssize(preprocessor) > 1' failed.
  • Aborted (core dumped)

Found by fuzzing, #1131.

@MarekKnapek MarekKnapek added the bug Something isn't working label Jul 20, 2024
@hsutter
Copy link
Owner

hsutter commented Jul 20, 2024

Thanks! I've also edited this one to paste the source code directly into the issue, to avoid clicking on links to zipfiles (malware potential).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants