Skip to content

bpo-31734: Raise a ValueError instead of crashing, when the get() method of an uninitialized sqlite3.Cache object is called#3939

Closed
orenmn wants to merge 11 commits into
python:masterfrom
orenmn:bpo31734-fix-crash-and-partial-init-and-refleaks
Closed

bpo-31734: Raise a ValueError instead of crashing, when the get() method of an uninitialized sqlite3.Cache object is called#3939
orenmn wants to merge 11 commits into
python:masterfrom
orenmn:bpo31734-fix-crash-and-partial-init-and-refleaks

Conversation

@orenmn
Copy link
Copy Markdown
Contributor

@orenmn orenmn commented Oct 9, 2017

In addition:

  • Prevent a Cache object from becoming partially initialized in case its __init__() method failed after it was already initialized. (And thus prevent the case of raising a SystemError by the get() method of a partially initialized Cache object. The fix for that would also prevent refleaks in case of calling the __init__() method of a Cache object more than once.)
  • Prevent a memory leak in the deallocation of an uninitialized Cache object.
  • Add tests to test_sqlite, to verify that the crash and the SystemError are no more.

https://bugs.python.org/issue31734

@berkerpeksag
Copy link
Copy Markdown
Member

Closing as per https://bugs.python.org/issue31734#msg322171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants