-
Notifications
You must be signed in to change notification settings - Fork 710
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
Finish updating testsuite #2001
Conversation
1c2c6af
to
bb0dc9c
Compare
bb0dc9c
to
3cafe70
Compare
#define ERROR(...) parser->Error(GetLocation(), __VA_ARGS__) | ||
#define ERROR(...) \ | ||
if (parser) \ | ||
parser->Error(GetLocation(), __VA_ARGS__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the change in tokenization, ReadReservedChars() now needs to be able to call GetStringToken() if it sees a "
character, but GetStringToken takes a WastParser
named parser
so it can call the ERROR macro, and ReadReservedChars() is called in a whole bunch of places and takes no arguments. So... this makes it possible for ReadReservedChars() to call GetStringToken(nullptr)
without causing a crash if that wants to log an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But won't this mean that such errors can/will be lost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, now that strings can be part of a reserved
token, we would lose the log message if an invalid string is found while running NoTrailingReservedChars(). I think the best/cleanest fix for this is #2013, which just makes the WastLexer work similar to a WastParser (it receives an Errors* on construction and stores it so it can log errors from any context).
…ly#2001) * Update testsuite (adding new tokens.txt test) * Adjust Wast lexing to match updated spec (WebAssembly/spec#1499)
This had been crashing even with annotations disabled. Adds a regression test. This was missed in #2001 when updating the parser to match the updated spec (WebAssembly/spec#1499). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935
This had been crashing even with annotations disabled. Adds a regression test. This was missed in #2001 when updating the parser to match the updated spec (WebAssembly/spec#1499). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935
This had been crashing even with annotations disabled. Adds a regression test. This was missed in #2001 when updating the lexer to match the updated spec (WebAssembly/spec#1499). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53935
The testsuite was already updated in #2003, so this just runs
update-spec-tests.py
to bring in the newtokens.wast
test. The Wast lexer changes are necessary because of WebAssembly/spec#1499 . There may be a more elegant way to make this change, though...