Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement tp_traverse #314

Closed
rogerbinns opened this issue Sep 14, 2021 · 2 comments
Closed

Implement tp_traverse #314

rogerbinns opened this issue Sep 14, 2021 · 2 comments

Comments

@rogerbinns
Copy link
Owner

rogerbinns commented Sep 14, 2021

A reference cycle is ultimately the root cause of these symptoms. tp_traverse/tp_clear needs to be implemented to prevent that.

https://groups.google.com/g/python-sqlite/c/jyqYdj3vadE

rogerbinns added a commit that referenced this issue Sep 14, 2021
@rogerbinns
Copy link
Owner Author

Still todo: verify if this is needed for the other types like Cursor, Blob, Backup etc.

@rogerbinns
Copy link
Owner Author

It looks like the builtin sqlite module also had the same issue, fixed in CPython 3.10

rogerbinns added a commit that referenced this issue Dec 7, 2021
If objects aren't conventionally allocatable then the GC flag
causes access to before the allocated PyObject which then causes
out of bounds memory access and crash.

This makes cursor allocation the normal (and exposed) way
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant