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

AV in isc_dsql_free_statement() [CORE1868] #2299

Closed
firebird-automations opened this issue Apr 25, 2008 · 5 comments
Closed

AV in isc_dsql_free_statement() [CORE1868] #2299

firebird-automations opened this issue Apr 25, 2008 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @AlexPeshkoff

When releasing statement with isc_dsql_free_statement(), AV happens in client library

Commits: b474ff2 dceac94

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

It seems IBO copies handle value into new variable after isc_dsql_alloc_statement2() and later deleted original variable which was used to initially obtain handle value.

Taking into an account, that "isc_dsql_allocate_statement2()
function is similar to the isc_dsql_alloc_statement() function except that
statement handles allocated using isc_dsql_allocate_statement2() are
automatically reset to NULL when the database under which they are allocated
is detached" (taken from ib6.0 beta docs), this is close to violation of API rules. On the other hand, nothing is said about isc_dsql_free_statement(), and if IBO itself releases all statements before detach, it works correctly. (Though there is no use in isc_dsql_allocate_statement2() instead of isc_dsql_allocate_statement() in that case.)

Legacy behavior of isc_dsql_free_statement() is restored.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Alpha 1 [ 10224 ]

Fix Version: 2.1.1 [ 10223 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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

No branches or pull requests

2 participants