-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix local token replay limit, add global replay limit #1663
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit acc9090 Results
|
Codecov Report
@@ Coverage Diff @@
## master #1663 +/- ##
==========================================
+ Coverage 76.49% 76.51% +0.01%
==========================================
Files 291 291
Lines 61022 61049 +27
==========================================
+ Hits 46679 46709 +30
+ Misses 12731 12727 -4
- Partials 1612 1613 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
3bd7c69
to
2451ecd
Compare
2451ecd
to
cf0e7f9
Compare
Description
The local replay was not correctly implemented:
An ambiguity does not just end when the buffered tokens are accepted, it also ends after replaying the buffered tokens and re-parsing using a different rule.
Explicitly state when an ambiguity starts and ends, and reset the local token replay limit.
In addition, add a global replay limit, as the local replay limit might not be sufficient in rejecting programs that are too ambiguous.
I parsed all Mainnet contracts using these changes and they all still parse.
TODO: Wrap errors in fatal errors, depends on #1660
master
branchFiles changed
in the Github PR explorer