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
The parser uses an itertools adapter that allows putting items back into an iterator. However, if you put back two items in a row, it overwrites the previous item. The bug was caused by removing and putting back an Eof token, and then putting back another token, overwriting the Eof token. The parser assumes that it will never advance past the last token, but since the Eof token was overwritten, it does so and crashes.
Activity
casey commentedon Oct 13, 2018
Awesome, nice find!
The parser uses an itertools adapter that allows putting items back into an iterator. However, if you put back two items in a row, it overwrites the previous item. The bug was caused by removing and putting back an
Eoftoken, and then putting back another token, overwriting theEoftoken. The parser assumes that it will never advance past the last token, but since theEoftoken was overwritten, it does so and crashes.casey commentedon Oct 13, 2018
I'm surprised that nobody ever hit this organically!
Add bug found in just