hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.23k stars 224 forks source link

[BUG] Assert failed, file `lex.h`, line `320`. #1130

Closed MarekKnapek closed 1 week ago

MarekKnapek commented 1 week ago

Describe the bug File lex.h. Line 320. Expression global_token_order == 0.

To Reproduce Steps to reproduce the behavior:

  1. Download source code of cppfront.
  2. Compile cppfront.
  3. Run cppfront on test.cpp2 file.
  4. Assert triggers inside cppfront.

Additional context Test.cpp2 file's content is only 24 bytes long and it is: nI:(Q):floatl:()h:r:~-=:.

DyXel commented 1 week ago

nI:(Q):floatl:()h:r:~-=:

Man, I hate when that happens in my code 😅

Jokes aside, this made me think we should probably setup some fuzzing at some point.

MarekKnapek commented 1 week ago

nI:(Q):floatl:()h:r:~-=:

Man, I hate when that happens in my code 😅

Jokes aside, this made me think we should probably setup some fuzzing at some point.

Yes, issue created: https://github.com/hsutter/cppfront/issues/1131.

hsutter commented 1 week ago

Thanks! I was just about to ask whether you were fuzzing. 👍 This is great!