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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
6dbd2209
Commit
6dbd2209
authored
Apr 28, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve GIL-state assertion to point at the user function that triggered it.
parent
4bfd9354
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+4
-2
No files found.
Cython/Compiler/Nodes.py
View file @
6dbd2209
...
...
@@ -2080,7 +2080,8 @@ class FuncDefNode(StatNode, BlockNode):
# ----- Non-error return cleanup
code
.
put_label
(
code
.
return_label
)
assert
gil_owned
[
'error'
]
==
gil_owned
[
'success'
],
"%s != %s"
%
(
gil_owned
[
'error'
],
gil_owned
[
'success'
])
assert
gil_owned
[
'error'
]
==
gil_owned
[
'success'
],
"%s: error path %s != success path %s"
%
(
self
.
pos
,
gil_owned
[
'error'
],
gil_owned
[
'success'
])
for
entry
in
used_buffer_entries
:
assure_gil
(
'success'
)
...
...
@@ -2110,7 +2111,8 @@ class FuncDefNode(StatNode, BlockNode):
# If we came through the success path, then we took the same GIL decisions as for jumping here.
# If we came through the error path and did not jump, then we aligned both paths above.
# In the end, all paths are aligned from this point on.
assert
gil_owned
[
'error'
]
==
gil_owned
[
'success'
],
"%s != %s"
%
(
gil_owned
[
'error'
],
gil_owned
[
'success'
])
assert
gil_owned
[
'error'
]
==
gil_owned
[
'success'
],
"%s: error path %s != success path %s"
%
(
self
.
pos
,
gil_owned
[
'error'
],
gil_owned
[
'success'
])
code
.
put_label
(
code
.
return_from_error_cleanup_label
)
for
entry
in
lenv
.
var_entries
:
...
...
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