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
56673057
Commit
56673057
authored
Jun 06, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lock analysis relying on too restrictive checks
parent
2db7ac1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-4
No files found.
Cython/Compiler/ExprNodes.py
View file @
56673057
...
...
@@ -710,7 +710,7 @@ class ExprNode(Node):
return self.type.is_cyp_class and self.type.lock_mode == "checklock"
def get_tracked_state(self, env):
if
not
hasattr
(
self
,
'entry'
)
or
not
self
.
entry
.
type
.
is_cyp_class
:
if not hasattr(self, 'entry') or not self.entry
or not self.entry
.type.is_cyp_class:
return
self.tracked_state = env.lookup_tracked(self.entry)
if self.tracked_state is None:
...
...
@@ -746,7 +746,7 @@ class ExprNode(Node):
self.ensure_subexpr_rhs_locked(env)
if not self.tracked_state:
self.get_tracked_state(env)
if
is_dereferenced
:
if is_dereferenced
and self.tracked_state
:
if not self.is_rhs_locked(env):
if self.is_checklock():
error(self.pos, "This expression is not correctly locked (read lock needed)")
...
...
@@ -757,7 +757,7 @@ class ExprNode(Node):
self.ensure_subexpr_lhs_locked(env)
if not self.tracked_state:
self.get_tracked_state(env)
if
is_dereferenced
:
if is_dereferenced
and self.tracked_state
:
if not self.is_lhs_locked(env):
if self.is_checklock():
error(self.pos, "This expression is not correctly locked (write lock needed)")
...
...
@@ -7297,7 +7297,7 @@ class AttributeNode(ExprNode):
gil_message = "Accessing Python attribute"
def ensure_subexpr_rhs_locked(self, env):
if
self
.
entry
.
is_cfunction
and
not
self
.
entry
.
type
.
is_const_method
:
if
not self.entry or
self.entry.is_cfunction and not self.entry.type.is_const_method:
self.obj.ensure_lhs_locked(env, is_dereferenced = True)
else:
self.obj.ensure_rhs_locked(env, is_dereferenced = True)
...
...
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