Subject FB 1.5 GPRE programs crash
Author Thad Humphries
Today I installed the Firebird 1.5 final release on Linux (SuSE 9). In
testing GPRE with my current suite of embedded SQL programs, I finding that
all programs tested crash when attempting to call 'EXEC SQL DISCONNECT
<my_db>;'. All of these programs worked under Firebird 1.x. The database
was made with Firebird 1.x and behaves properly otherwise--I've only seen it
die at 'EXEC SQL DISCONNECT <my_db>;'. However, even programs compiled under
GPRE 1.x crash if FB 1.5 is running.

All programs are C. My compiler is gcc 3.3.1. My GPRE flags are "-c -n -m".
My gcc flags are "-c -O2 -fPIC -fwritable-strings".

I can see the printf() just before 'EXEC SQL DISCONNECT <my_db>;'. At this
point there is a segmetation fault. In gdb I see the following stack trace:

...
close_db(), ready to disconnect

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 26928)]
0x40035fa0 in gds__unregister_cleanup ()
from /opt/firebird/lib/libfbclient.so.1
(gdb) bt
#0 0x40035fa0 in gds__unregister_cleanup ()
from /opt/firebird/lib/libfbclient.so.1
#1 0x40050ff9 in INET_set_clients () from /opt/firebird/lib/libfbclient.so.1
#2 0x4006122f in port::disconnect() () from /opt/firebird/lib/
libfbclient.so.1
#3 0x40055084 in REM_detach_database ()
from /opt/firebird/lib/libfbclient.so.1
#4 0x4004183c in isc_detach_database ()
from /opt/firebird/lib/libfbclient.so.1
#5 0x0804a211 in close_db ()
#6 0x08049c6c in main ()
(gdb)

Has anyone else seen this problem or have any ideas?