ECPG Segfaulting on EXEC SQL connect

Поиск
Список
Период
Сортировка
От John Smith
Тема ECPG Segfaulting on EXEC SQL connect
Дата
Msg-id 200412282214.iBSME3G8013073@romana.roundel.net
обсуждение исходный текст
Ответы Re: ECPG Segfaulting on EXEC SQL connect
Список pgsql-general
Hello,
 
I'm trying to convert a series of C programs written originally using Informix ESQL to use Postgres' ECPG.
 
All of my test programs written from scratch seem to work ok, and I can now precompile, compile and link without error, but when I actually run the program, I get a segfault. This appears to be in the code called by EXEC SQL CONNECT... as evidenced below (output from gdb):
 
Program received signal SIGSEGV, Segmentation fault.
0x08053640 in error_message ()
(gdb) up
#1  0x4005b95a in _init () from /usr/lib/libpq.so.3
(gdb) up
#2  0x4005ba8f in _init () from /usr/lib/libpq.so.3
(gdb) up
#3  0x4005c35d in fe_getauthname () from /usr/lib/libpq.so.3
(gdb) up
#4  0x4005ed2d in pqPacketSend () from /usr/lib/libpq.so.3
(gdb) up
#5  0x4005c44c in PQconnectStart () from /usr/lib/libpq.so.3
(gdb) up
#6  0x4005c90a in PQsetdbLogin () from /usr/lib/libpq.so.3
(gdb) up
#7  0x4003bf7f in ECPGconnect () from /usr/lib/libecpg.so.4
(gdb) up
#8  0x0804ed15 in cgiMain () at register_customer.pgc:575
575             EXEC SQL connect to pdev_changename;
(gdb)
The database is called pdev_changename, and that same connect statement has worked in another test program.
 
I'm precompiling using
ecpg -t -C INFORMIX register_customer.pgc -o register_customer.c
 
and compling with
gcc -g  register_customer.c <<some .o and .a files>> -o register_customer.cgi \
-I/usr/include/pgsql -I/usr/include/pgsql/informix -lecpg -lecpg_compat -L/usr/lib/pgsql
 
I'm using Postgres 8.0.0rc1 on Redhat 9 (kernel 2.4.20-31.9). The same thing happens on fedora core 3, and using Postgres 7.4.6-1.FC3-1.
 
The ability to define variables of type "timestamp" etc. is so useful, so I really want to keep using "-C INFORMIX" if I can.
 
Can anyone help shed any light on this?
 
Thanks,
 
John
john(at)roundel(dot)net

В списке pgsql-general по дате отправления:

Предыдущее
От: Dan Boitnott
Дата:
Сообщение: Large Objects
Следующее
От: Benjamin Smith
Дата:
Сообщение: Tracking back foreign keys?