paleolimbot opened a new issue, #2264:
URL: https://github.com/apache/arrow-adbc/issues/2264

   ### What happened?
   
   When testing the framework driver in #2186, the driver manager segfaulted 
when the database init errored. The segfault happened here:
   
   
https://github.com/apache/arrow-adbc/blob/5248c3457e00770d4b5bc215e5f71013f449d1ca/c/driver_manager/adbc_driver_manager.cc#L670
   
   ...because the function pointer for the error detail was `nullptr`.
   
   I *think* this is because the driver had been released on a call to 
`SetOption()`:
   
   
https://github.com/apache/arrow-adbc/blob/5248c3457e00770d4b5bc215e5f71013f449d1ca/c/driver_manager/adbc_driver_manager.cc#L956
   
   I am wondering if we hadn't seen this because typically database options are 
checked when the connection is initialized (or because drivers weren't zeroing 
the function pointers on release until using the framework).
   
   An easy stopgap would be to also check that 
`error->private_driver->ErrorGetDetail != nullptr` here:
   
   
https://github.com/apache/arrow-adbc/blob/5248c3457e00770d4b5bc215e5f71013f449d1ca/c/driver_manager/adbc_driver_manager.cc#L667-L673
   
   ### Stack Trace
   
   _No response_
   
   ### How can we reproduce the bug?
   
   _No response_
   
   ### Environment/Setup
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to