JNI events, spurious callbacks can trigger access violations + incomplete cleanup [JDBC398] #440
Labels
affect-version: Jaybird 2.2
affect-version: Jaybird 2.2.1
affect-version: Jaybird 2.2.2
affect-version: Jaybird 2.2.3
affect-version: Jaybird 2.2.4
affect-version: Jaybird 2.2.5
affect-version: Jaybird 2.2.6
affect-version: Jaybird 2.2.7
component: events
component: jni/jna layer
priority: critical
resolution: wontfix
type: bug
Submitted by: @mrotteveel
With Firebird 3.0.0.31839 fbclient spurious callbacks can occur (see CORE4795). In the current implementation these spurious callbacks will cause the deletion of the JNI globalrefs to the eventhandler and the eventhandle. On subsequent invocation of the callback this can (and eventually: will) cause an access violation (0xc0000005).
Although CORE4795 needs to be fixed, the Jaybird code should ignore these spurious callbacks.
It also looks like the current cleanup depends on the callback being invoked after cancellation, which might not actually occur (eg if the event is cancelled when none is queued). The cleanup of the eventstruct and its global refs should be an explicit step as part of the event cancellation.
Commits: efadd3f ba88c5f
The text was updated successfully, but these errors were encountered: