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

Don't crash for invalid toplevel parseStmt/Expr calls #23089

Merged
merged 10 commits into from
Dec 19, 2023

Commits on Dec 18, 2023

  1. Make reject action check the compiler actually failed

    Needed this for writing the test so that I can still check for errors while also testing that the compiler didn't crash
    ire4ever1190 committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    2bb8f43 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8956d1b View commit details
    Browse the repository at this point in the history
  3. Assign register with empty node if anything goes wrong

    The error flag is checked after anyways so this shouldn't cause problem
    
    This stops the segfault so it is accessing something
    
    Alternative solution is to check the error flag ourselves and assign an empty node (Or maybe an error node?) if something goes wrong
    ire4ever1190 committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    dc735f8 View commit details
    Browse the repository at this point in the history
  4. Update expected failure code

    File never failed so exit code differing is better error than files differing
    ire4ever1190 committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    f43136a View commit details
    Browse the repository at this point in the history
  5. Revert changing the expected message, instead only check error code a…

    …fter messages
    
    The other stuff isn't failing for me :/ so think this is the safest option since it should keep backwards compaitability
    ire4ever1190 committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    53d89f0 View commit details
    Browse the repository at this point in the history
  6. Close the process after reading the error code

    On windows `peekExitCode` will always return 0 if read after the process is closed
    ire4ever1190 committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    8c05da1 View commit details
    Browse the repository at this point in the history
  7. Turns out the error changed since I edited macros.nim

    Now I just check the suffix so that editing the file won't have affects
    ire4ever1190 committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    9028d71 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    650a800 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. Configuration menu
    Copy the full SHA
    853aa94 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    207b1f3 View commit details
    Browse the repository at this point in the history