Я не заметил. При компиле выше написанного (с изменением типа функции на `int') вот что вылазит... :
root@ch00r:~/kgrfm# ulimit -Sc unlimited
root@ch00r:~/kgrfm# gcc -o k k.c -lmysqlclient -ggdb
root@ch00r:~/kgrfm# ./k
Segmentation fault (core dumped)
root@ch00r:~/kgrfm# gdb -c core
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-slackware-linux".
Core was generated by `./k'.
Program terminated with signal 11, Segmentation fault.
#0 0x400c8640 in ?? ()
(gdb) inf reg
eax 0x100 256
ecx 0xbfffebc0 -1073747008
edx 0x4005105c 1074073692
ebx 0x40181234 1075319348
esp 0xbfffeb40 0xbfffeb40
ebp 0xbfffeb58 0xbfffeb58
esi 0x54 84
edi 0x4003cc38 1073990712
eip 0x400c8640 0x400c8640
eflags 0x10202 66050
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x2b 43
gs 0x2b 43
fctrl 0x0 0
fstat 0x0 0
ftag 0x0 0
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
---Type <return> to continue, or q <return> to quit---
fop 0x0 0
(gdb) q
root@ch00r:~/kgrfm# gdb
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-slackware-linux".
(gdb) file k
Reading symbols from k...done.
(gdb) run k
Starting program: /root/kgrfm/k k
Program received signal SIGSEGV, Segmentation fault.
0x400c8640 in malloc () from /lib/libc.so.6
(gdb) q
The program is running. Exit anyway? (y or n) y
root@ch00r:~/kgrfm# fuck :(
bash: syntax error near unexpected token `('
root@ch00r:~/kgrfm#
---
Тут уж фиг его знает.
|