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

[C++] Fix bugs in ParserATNSimulator and PredictionContextMergeCache #3644

Merged
merged 3 commits into from Apr 11, 2022

Conversation

jcking
Copy link
Collaborator

@jcking jcking commented Apr 11, 2022

Fixes #3641 which I accidentally introduced during a refactor, by starting by 0 when the original started at 1. Also fixes #3643.

Signed-off-by: Justin King <jcking@google.com>
@KvanTTT
Copy link
Member

KvanTTT commented Apr 11, 2022

  • Could you suggest a unit-test that covers the bug?
  • Does the bug relate to other runtimes?

Signed-off-by: Justin King <jcking@google.com>
@jcking
Copy link
Collaborator Author

jcking commented Apr 11, 2022

No, this is purely C++. During a refactor I accidentally started the for loop at 0 instead of 1. Really catching bugs like this needs overall better testing, as the grammar needs to exercise the code path. Surelog caught this bug during testing.

@jcking
Copy link
Collaborator Author

jcking commented Apr 11, 2022

This also fixes #3643.

@jcking
Copy link
Collaborator Author

jcking commented Apr 11, 2022

@parrt

@jcking jcking changed the title [C++] Fix bug in ParserATNSimulator [C++] Fix bugs in ParserATNSimulator and PredictionContextMergeCache Apr 11, 2022
…ble resources

Signed-off-by: Justin King <jcking@google.com>
@parrt
Copy link
Member

parrt commented Apr 11, 2022

Thanks!!! I will try to release today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants