Christoph Kottke writes:
 > hi,
 > i've installed the latest cvs revisions for libdbi and libdbi-driver and 
 > when ever i try to fetch more than
 > 3 row from an firebird table it's end in an segfault.
 > but when i revert the "bull patch" in dbi_result.c it works like a charm.

thanks for the bug report. This one barely came in time to stop me
from packaging the long-awaited 0.9 releases :-/

Unfortunately, I haven't been able to make firebird
operational on my FreeBSD box for at least two years so I cannot do
any real debugging here. I plan to set up a Debian box shortly which
may be a better platform for this database engine.

It took me a couple of hours to more or less understand what's going
on in theory. In any case, I've got a hunch. I assume the "bull patch"
was correct as it fixed a memory leak shown by valgrind, without
causing any problems with the drivers that I can test over here. What
if the firebird driver just happened to work ok as long as libdbi
prevented one particular bordercase to occur, at the expense of some
bits of leaked memory? In that case it would be wrong to revert the
patch. Instead, someone in the know (Christian please ???) would have
to review the result fetching code of the firebird driver with an eye
on numrows_matched. According to what I've seen in the driver code,
firebird makes it particularly hard to get things right.

Also, Christoph, did you run make check? If that didn't crash, we need
extra tests to discover problems like these.


Markus Hoenicka
AQ score 38

Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
libdbi-users mailing list

Reply via email to