Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5e80855a
Commit
5e80855a
authored
Oct 07, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #24098: Fixed possible crash when AST is changed in process of
compiling it.
parents
3df053e5
cf380602
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
230 additions
and
0 deletions
+230
-0
Misc/NEWS
Misc/NEWS
+3
-0
Parser/asdl_c.py
Parser/asdl_c.py
+7
-0
Python/Python-ast.c
Python/Python-ast.c
+220
-0
No files found.
Misc/NEWS
View file @
5e80855a
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 beta 2
Core and Builtins
-----------------
- Issue #24098: Fixed possible crash when AST is changed in process of
compiling it.
- Issue #28201: Dict reduces possibility of 2nd conflict in hash table when
hashes have same lower bits.
...
...
Parser/asdl_c.py
View file @
5e80855a
...
...
@@ -526,6 +526,13 @@ class Obj2ModVisitor(PickleVisitor):
self
.
emit
(
"res = obj2ast_%s(PyList_GET_ITEM(tmp, i), &value, arena);"
%
field
.
type
,
depth
+
2
,
reflow
=
False
)
self
.
emit
(
"if (res != 0) goto failed;"
,
depth
+
2
)
self
.
emit
(
"if (len != PyList_GET_SIZE(tmp)) {"
,
depth
+
2
)
self
.
emit
(
"PyErr_SetString(PyExc_RuntimeError,
\
"
%s field
\
\
\
"
%s
\
\
\
"
"
"changed size during iteration
\
"
);"
%
(
name
,
field
.
name
),
depth
+
3
,
reflow
=
False
)
self
.
emit
(
"goto failed;"
,
depth
+
3
)
self
.
emit
(
"}"
,
depth
+
2
)
self
.
emit
(
"asdl_seq_SET(%s, i, value);"
%
field
.
name
,
depth
+
2
)
self
.
emit
(
"}"
,
depth
+
1
)
else
:
...
...
Python/Python-ast.c
View file @
5e80855a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment