mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Performance fix - Use basic blocks instead of full cfg reachability.
This commit is contained in:
@@ -277,4 +277,11 @@ def closed28(path):
|
||||
try:
|
||||
f28.write("hi")
|
||||
finally:
|
||||
f28.close()
|
||||
f28.close()
|
||||
|
||||
def closed29(path):
|
||||
# Due to an approximation in CFG reachability for performance, it is not detected that the `write` call that may raise occurs after the file has already been closed.
|
||||
# We presume this case to be uncommon.
|
||||
f28 = open(path) # $SPURIOUS:notClosedOnException
|
||||
f28.close()
|
||||
f28.write("already closed")
|
||||
Reference in New Issue
Block a user