Skip to content

Conversation

@jorisvandenbossche
Copy link
Member

This came up experimenting in #702. This patch seems to protect from segfaults when reading from a stream when the statement was already closed (AdbcStatementRelease was called).
Is that something we want to add? (and is it a proper way to achieve it?)

@lidavidm
Copy link
Member

I'm not sure this is worth doing; isn't it already a use-after-free? The fact that the memory happens to still be around is just a detail.

Possibly the statement should track whether a stream is still open and prevent release instead (converting a use-after-free into a possible leak)

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

Successfully merging this pull request may close these issues.

2 participants