Имя пользователя:
Пароль:
 

Название темы: Точка входа
Показать сообщение отдельно

Новый участник


Сообщения: 37
Благодарности: 0

Профиль | Отправить PM | Цитировать


Может быть и библиотеки нету, но тогда скрипт configure должен был об этом сообщить. Программа, собственно, - squid. Глюк происходит в Novell Linux Desktop 9 со всеми версиями сквида. При компиляции выдается следующее:

g++ -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -g -O2 -g -o cf_gen cf_gen.o -L/tmp/squid-3.0-PRE3-20050128/lib -lmiscutil -lm /usr/lib/libbind.so -lpthread -lnsl
./cf_gen cf.data
make[1]: *** [cf_parser.h] Floating point exception
make[1]: Leaving directory `/tmp/squid-3.0-PRE3-20050128/src'

Дамп отладчика:

#gdb ./cf_gen
GNU gdb 6.1
Copyright 2004 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 "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) set args cf.data
(gdb) r
Starting program: /tmp/squid-3.0-PRE3-20050128/src/cf_gen cf.data

Program received signal SIGFPE, Arithmetic exception.
0x40008cc2 in ?? ()
(gdb) p/a 0x40008cc2
$1 = 0x40008cc2
(gdb) b main
Breakpoint 1 at 0x8048d0c: file cf_gen.cc, line 156.
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /tmp/squid-3.0-PRE3-20050128/src/cf_gen cf.data

Program received signal SIGFPE, Arithmetic exception.
0x40008cc2 in ?? ()
(gdb) p main
$2 = {int (int, char **)} 0x8048d00 <main>

Как видим, до main дело не дошло, адрес вылета никому известному не принадлежит.
И более глубоко:

(gdb) b 0x40008cc0
Function "0x40008cc0" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (0x40008cc0) pending.
(gdb) r
Starting program: /tmp/squid-3.0-PRE3-20050128/src/cf_gen cf.data

Program received signal SIGFPE, Arithmetic exception.
0x40008cc2 in ?? ()
(gdb) disas 0x40008cc0 0x40008cd0
Dump of assembler code from 0x40008cc0 to 0x40008cd0:
0x40008cc0: xor %edx,%edx
0x40008cc2: div %edi
0x40008cc4: imul %edi,%eax
0x40008cc7: sub %eax,%ecx
0x40008cc9: mov 0xffffffec(%ebp),%eax
0x40008ccc: sub %eax,%ecx
0x40008cce: mov 0xfffffff0(%ebp),%eax
End of assembler dump.
(gdb) i r
eax 0x58 88
ecx 0x58 88
edx 0x0 0
ebx 0x400166e0 1073833696
esp 0xbfffea58 0xbfffea58
ebp 0xbfffea70 0xbfffea70
esi 0x40017218 1073836568
edi 0x0 0
eip 0x40008cc2 0x40008cc2
eflags 0x210246 2163270
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x0 0
(gdb)

Вылет происходит на команде div %edi, который равен нулю
Есть какие-нибудь мысли?

Отправлено: 23:59, 22-05-2005 | #3

Название темы: Точка входа