You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thank you for making this library. I've been using it extensively in my TSLCompiler project.
I found an issue when running tests, where occasionally, some or all of my tests would fail with a SigInvalid, specifically on Windows. Here's an example from a CI run:
5/5 errors FAIL 0.03s (exit status 3221225477 or signal 3221225349 SIGinvalid)
------------------------------------- 8< -------------------------------------
Feature: An error message should be provided when an issue comes up with the Lexer or Parser.
Scenario: The Parser reports an invalid Category.
Given a TSL input file called invalid_category.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention finding 'Property variable' in the wrong spot.
Then line 2 of the error message should mention the given TSL input file at line 1, column 3.
Then line 3 of the error message should point to the token Huh? in line 1 with line 2 below it.
Scenario: The Parser reports an invalid Choice.
Given a TSL input file called invalid_choice.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention finding 'Property variable' in the wrong spot.
Then line 2 of the error message should mention the given TSL input file at line 2, column 7.
Then line 3 of the error message should point to the token Huh? in line 2 with line 3 below it.
Scenario: The Parser reports an error for the common case of a property followed by an if statement.
Given a TSL input file called invalid_property_then_if.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention finding 'Constraint' in the wrong spot.
Then line 2 of the error message should mention the given TSL input file at line 5, column 43.
Then line 3 of the error message should point to the token if in line 5 with line 6 below it.
Error: o: The Parser reports an error for the common case of a [single][error].
Given a TSL input file called invalid_double_marking.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention finding 'Error marking' in the wrong spot.
Then line 2 of the error message should mention the given TSL input file at line 3, column 39.
Error: Then line 3 of the error message should point to the token [error] in line 3 with line 4 below it.
Scenario: The Parser reports an undefined property error when a property used was defined in the same Category.
Given a TSL input file called defined_property_used_in_same_category.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention 'Property test1 not defined in any prior Categories.'.
Then line 2 of the error message should mention the given TSL input file at line 3, column 33.
Then line 3 of the error message should point to the token test1 in line 3 with line 4 below it.
Scenario: The Parser reports an undefined property error if the property was never defined.
Given a TSL input file called undefined_property.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention 'Property test2 not defined in any prior Categories.'.
Then line 2 of the error message should mention the given TSL input file at line 3, column 33.
Then line 3 of the error message should point to the token test2 in line 3 with line 4 below it.
Scenario: The Parser reports a duplicated property error if the property was defined twice.
Given a TSL input file called duplicate_property.txt,
When the error messages are redirected to be read by us,
When the Parser consumes the input,
Then line 1 of the error message should mention 'Property test2 was already defined elsewhere.'.
Then line 2 of the error message should mention the given TSL input file at line 3, column 39.
Then line 3 of the error message should point to the token test2 in line 3 with line 4 below it.Suite 'global': all tests passed (28 asserts in 1 tests)
------------------------------------------------------------------------------
Hello! Thank you for making this library. I've been using it extensively in my TSLCompiler project.
I found an issue when running tests, where occasionally, some or all of my tests would fail with a SigInvalid, specifically on Windows. Here's an example from a CI run:
I turned on address sanitization, and every test that failed reports an access violation. Here's a sample from another CI run with address sanitization turned on:
It seems the problem comes from this snippet in
ut.hpp
, whereargv[0]
is a nullptr on Windows:And I was able to fix it by moving the call to parse here:
I'm not sure whether this was an appropriate fix, but it seems to be passing all of the CI tests in my fork. Any idea on what's going on?
The text was updated successfully, but these errors were encountered: