Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
9f18281a
Commit
9f18281a
authored
Sep 13, 2017
by
Ronan Lamy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix segfault on PyPy3 when passing NULL method_name to _Pyx_dict_iterator
parent
d2653b4d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
Cython/Utility/Optimize.c
Cython/Utility/Optimize.c
+12
-10
No files found.
Cython/Utility/Optimize.c
View file @
9f18281a
...
...
@@ -294,8 +294,9 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di
// On PyPy3, we need to translate manually a few method names.
// This logic is not needed on CPython thanks to the fast case above.
static
PyObject
*
py_items
=
NULL
,
*
py_keys
=
NULL
,
*
py_values
=
NULL
;
const
char
*
name
=
PyUnicode_AsUTF8
(
method_name
);
PyObject
**
pp
=
NULL
;
if
(
method_name
)
{
const
char
*
name
=
PyUnicode_AsUTF8
(
method_name
);
if
(
strcmp
(
name
,
"iteritems"
)
==
0
)
pp
=
&
py_items
;
else
if
(
strcmp
(
name
,
"iterkeys"
)
==
0
)
pp
=
&
py_keys
;
else
if
(
strcmp
(
name
,
"itervalues"
)
==
0
)
pp
=
&
py_values
;
...
...
@@ -307,6 +308,7 @@ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_di
}
method_name
=
*
pp
;
}
}
#endif
}
*
p_orig_length
=
0
;
...
...
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