[Libreoffice-bugs] [Bug 117842] Firebird: Enabling connection pooling for firebird:sdbc driver crashes Libo when creating connection to data engine

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Sep 11 10:54:09 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=117842

--- Comment #11 from Mike Kaganski <mikekaganski at hotmail.com> ---
In "normal" case, the XConnection (that gets passed to
FirebirdDriver::getDataDefinitionByConnection) is created in
OPoolCollection::getConnectionWithInfo using a simple call to xDriver->connect.
Given that xDriver is connectivity::firebird::FirebirdDriver, the resulting
object is connectivity::firebird::Connection.

In pooling case, OPoolCollection::getConnectionWithInfo takes another branch,
and creates the XConnection using a call to
pConnectionPool->getConnectionWithInfo, and that ends up in
connectivity::OPooledConnection::getConnection, which wraps "m_xRealConnection"
(which is the connectivity::firebird::Connection, also obtained from
FirebirdDriver) into a connectivity::OConnectionWeakWrapper.

So back in FirebirdDriver::getDataDefinitionByConnection, rConnection (which,
as described, may be of different actual classes) is unconditionally cast to
connectivity::firebird::Connection. Hence the crash.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210911/bc5e0120/attachment.htm>


More information about the Libreoffice-bugs mailing list