-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Check tokens[0] after allocating memory #95355
Copy link
Copy link
Closed
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixestype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixestype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Bug report
I have questions when reading the source code of file
pegen.c.There is a code snippet in function
_PyPegen_Parser_New:I think it makes more sense to check
p->tokens[0]but notp->tokensin if condition.I look at the PR #19669 where the code was introduced and no one discussed this. Is this an oversight, or am I wrong?
Your environment