bpo-31734: Raise a ValueError instead of crashing, when the get() method of an uninitialized sqlite3.Cache object is called by orenmn · Pull Request #3939 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@orenmn

Copy link Copy Markdown

Contributor

@orenmn orenmn commented

Oct 9, 2017

edited by bedevere-bot

Loading

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

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

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@orenmn @berkerpeksag @the-knights-who-say-ni @bedevere-bot