PDA

View Full Version : Error running proth_sieve



Matt
11-15-2005, 01:55 PM
I get a core dump when running proth_sieve on my AMD-K6 500Mhz, I've tried the cmov and regular versions both statically and non-statically. The error produced from a GDB analyses of the core is:

Core was generated by `proth_sieve_static_'.
Program terminated with signal 4, Illegal instruction.
#0 0x0807bd29 in operator new ()

Any ideas?

Greenbank
11-15-2005, 02:00 PM
Try downloading it again, it may be a corrupt binary.

Otherwise try running it from gdb itself, i.e.

gdb ./proth_sieve_binary_name

At the gdb> prompt just type

run

Then if you could do:
bt
info registers
disassemble

Either paste it here or drop me an email (alex at greenbank dot org) if it is too long.

Matt
11-15-2005, 06:47 PM
I downloaded it again and here's what I go:



[matt@gaspode:/home/matt/sieve] % ./proth_sieve_bsd
Illegal instruction (core dumped)
[matt@gaspode:/home/matt/sieve] % gdb ./proth_sieve_bsd
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd"...
(gdb) run
Starting program: /usr/home/matt/sieve/proth_sieve_bsd

Program received signal SIGILL, Illegal instruction.
0x0807cca9 in operator new ()
(gdb) bt
#0 0x0807cca9 in operator new ()
#1 0x0805f134 in __gnu_cxx::__pool_alloc<true, 0>::_S_chunk_alloc ()
#2 0x0805f1d8 in __gnu_cxx::__pool_alloc<true, 0>::_S_refill ()
#3 0x0805f018 in __gnu_cxx::__pool_alloc<true, 0>::allocate ()
#4 0x0805f36b in std::allocator<char>::allocate ()
#5 0x08077988 in std::string::_Rep::_S_create ()
#6 0x0807727b in std::string::_S_construct<char const*> ()
#7 0x0807a16c in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()
#8 0x08058f23 in __static_initialization_and_destruction_0 ()
#9 0x0808b0ed in __do_global_ctors_aux ()
#10 0x08048ca2 in _init ()
#11 0x080490af in _start ()
#12 0x00000001 in ?? ()
(gdb) info registers
eax 0x1 1
ecx 0x1e0 480
edx 0x0 0
ebx 0x3c0 960
esp 0xbfbfea50 0xbfbfea50
ebp 0xbfbfea68 0xbfbfea68
esi 0x0 0
edi 0x18 24
eip 0x807cca9 0x807cca9
eflags 0x10206 66054
cs 0x1f 31
ss 0x2f 47
ds 0x2f 47
es 0x2f 47
fs 0x2f 47
gs 0x8f 143
(gdb) disassemble
Dump of assembler code for function _Znwj:
0x0807cc98 <_Znwj+0>: push %ebp
0x0807cc99 <_Znwj+1>: mov %esp,%ebp
0x0807cc9b <_Znwj+3>: push %ebx
0x0807cc9c <_Znwj+4>: sub $0x14,%esp
0x0807cc9f <_Znwj+7>: mov 0x8(%ebp),%ebx
0x0807cca2 <_Znwj+10>: test %ebx,%ebx
0x0807cca4 <_Znwj+12>: mov $0x1,%eax
0x0807cca9 <_Znwj+17>: cmove %eax,%ebx
0x0807ccac <_Znwj+20>: mov %ebx,(%esp)
0x0807ccaf <_Znwj+23>: call 0x8048d64 <malloc>
0x0807ccb4 <_Znwj+28>: test %eax,%eax
0x0807ccb6 <_Znwj+30>: jne 0x807cd10 <_Znwj+120>
0x0807ccb8 <_Znwj+32>: mov 0x80a3950,%eax
0x0807ccbd <_Znwj+37>: test %eax,%eax
0x0807ccbf <_Znwj+39>: jne 0x807cceb <_Znwj+83>
0x0807ccc1 <_Znwj+41>: movl $0x4,(%esp)
0x0807ccc8 <_Znwj+48>: call 0x807bd3c <__cxa_allocate_exception>
0x0807cccd <_Znwj+53>: movl $0x808e5e0,(%eax)
0x0807ccd3 <_Znwj+59>: movl $0x807cc62,0x8(%esp)
0x0807ccdb <_Znwj+67>: movl $0x808e5f0,0x4(%esp)
0x0807cce3 <_Znwj+75>: mov %eax,(%esp)
0x0807cce6 <_Znwj+78>: call 0x807cb7e <__cxa_throw>
---Type <return> to continue, or q <return> to quit---
0x0807cceb <_Znwj+83>: call *%eax
0x0807cced <_Znwj+85>: mov %ebx,(%esp)
0x0807ccf0 <_Znwj+88>: call 0x8048d64 <malloc>
0x0807ccf5 <_Znwj+93>: test %eax,%eax
0x0807ccf7 <_Znwj+95>: je 0x807ccb8 <_Znwj+32>
0x0807ccf9 <_Znwj+97>: jmp 0x807cd10 <_Znwj+120>
0x0807ccfb <_Znwj+99>: cmp $0xffffffff,%edx
0x0807ccfe <_Znwj+102>: je 0x807cd08 <_Znwj+112>
0x0807cd00 <_Znwj+104>: mov %eax,(%esp)
0x0807cd03 <_Znwj+107>: call 0x8089b48 <_Unwind_Resume>
0x0807cd08 <_Znwj+112>: mov %eax,(%esp)
0x0807cd0b <_Znwj+115>: call 0x807c9c6 <__cxa_call_unexpected>
0x0807cd10 <_Znwj+120>: add $0x14,%esp
0x0807cd13 <_Znwj+123>: pop %ebx
0x0807cd14 <_Znwj+124>: pop %ebp
0x0807cd15 <_Znwj+125>: ret
0x0807cd16 <_Znwj+126>: nop
0x0807cd17 <_Znwj+127>: nop
End of assembler dump.
(gdb)

Greenbank
11-16-2005, 06:29 AM
Matt,

It's a cmov client and I don't think the AMD-K6 support cmov?

Look at the eip value in the info registers output:-

eip 0x807cca9 0x807cca9

that's the instruction pointer. Looking at the instruction at that address in the disassembly gives:-

0x0807cca9 <_Znwj+17>: cmove %eax,%ebx

Not sure what you can do here...

Matt
11-16-2005, 06:38 AM
I'm fairly sure that was the "regular" client I was running. I will download it again from the website and make double sure, I'll try the static and non-static versions of the regular client. The regular client should work on pretty much all systems shouldn't it? Also just noticed there's no SSE2 client for FreeBSD, any reason for this?

EDIT

Ok, here's the output of running the regular client, with no cmov or SSE2 and static compilation. I've removed all the repeating lines as there was litterally a thousand of them.

[matt@gaspode:/home/matt/sieve] % gdb ./proth_sieve_static_bsd
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd"...
(gdb) run
Starting program: /usr/home/matt/sieve/proth_sieve_static_bsd

Program received signal SIGILL, Illegal instruction.
0x0807bd29 in operator new ()
(gdb) bt
#0 0x0807bd29 in operator new ()
#1 0x0805e1b4 in __gnu_cxx::__pool_alloc<true, 0>::_S_chunk_alloc ()
#2 0x0805e258 in __gnu_cxx::__pool_alloc<true, 0>::_S_refill ()
#3 0x0805e098 in __gnu_cxx::__pool_alloc<true, 0>::allocate ()
#4 0x0805e3eb in std::allocator<char>::allocate ()
#5 0x08076a08 in std::string::_Rep::_S_create ()
#6 0x080762fb in std::string::_S_construct<char const*> ()
#7 0x080791ec in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()
#8 0x08057fa3 in __static_initialization_and_destruction_0 ()
#9 0x08099ea9 in __do_global_ctors_aux ()
#10 0x080480b6 in _init ()
#11 0x0804812f in _start ()
#12 0x00000001 in ?? ()
#13 0x00000000 in ?? ()
#14 0xbfbfed80 in ?? ()
#15 0xbfbfed8a in ?? ()
#16 0xbfbfed97 in ?? ()
#17 0xbfbfeda7 in ?? ()
#18 0xbfbfedbb in ?? ()
#19 0xbfbfee26 in ?? ()
#20 0xbfbfee31 in ?? ()
#21 0xbfbfee3d in ?? ()
#22 0xbfbfee52 in ?? ()
#23 0xbfbfee62 in ?? ()
#24 0xbfbfee84 in ?? ()
#25 0xbfbfeeb6 in ?? ()
#26 0xbfbfeec9 in ?? ()
#27 0xbfbfeeda in ?? ()
#28 0xbfbfeee7 in ?? ()
#29 0xbfbfeef6 in ?? ()
#30 0xbfbfef04 in ?? ()
#31 0xbfbfef0c in ?? ()
#32 0xbfbfef21 in ?? ()
#33 0xbfbfef2d in ?? ()
#34 0xbfbfef47 in ?? ()
#35 0xbfbfef64 in ?? ()
#36 0xbfbfef6e in ?? ()
#37 0xbfbfef79 in ?? ()
#38 0xbfbfef82 in ?? ()
#39 0x00000000 in ?? ()
#40 0x00000003 in ?? ()
#41 0x6d6f682f in ?? ()
#42 0x616d2f65 in ?? ()
#43 0x732f7474 in ?? ()
#44 0x65766569 in ?? ()
#45 0x6f72702f in ?? ()
#46 0x735f6874 in ?? ()
#47 0x65766569 in ?? ()
#48 0x6174735f in ?? ()
#49 0x5f636974 in ?? ()
#50 0x00647362 in ?? ()
#51 0x52455355 in ?? ()
#52 0x74616d3d in ?? ()
#53 0x4f4c0074 in ?? ()
#54 0x4d414e47 in ?? ()
#55 0x616d3d45 in ?? ()
#56 0x48007474 in ?? ()
#57 0x3d454d4f in ?? ()
#58 0x6d6f682f in ?? ()
#59 0x616d2f65 in ?? ()
#60 0x4d007474 in ?? ()
#61 0x3d4c4941 in ?? ()
#62 0x7261762f in ?? ()
#63 0x69616d2f in ?? ()
#64 0x616d2f6c in ?? ()
#65 0x50007474 in ?? ()
#66 0x3d485441 in ?? ()
#67 0x6962732f in ?? ()
#68 0x622f3a6e in ?? ()
#69 0x2f3a6e69 in ?? ()
#70 0x2f727375 in ?? ()
#71 0x6e696273 in ?? ()
#72 0x73752f3a in ?? ()
#73 0x69622f72 in ?? ()
#74 0x752f3a6e in ?? ()
#75 0x672f7273 in ?? ()
#76 0x73656d61 in ?? ()
#77 0x73752f3a in ?? ()
#78 0x6f6c2f72 in ?? ()
#79 0x2f6c6163 in ?? ()
#80 0x6e696273 in ?? ()
#81 0x73752f3a in ?? ()
#82 0x6f6c2f72 in ?? ()
#83 0x2f6c6163 in ?? ()
#84 0x3a6e6962 in ?? ()
#85 0x7273752f in ?? ()
#86 0x3131582f in ?? ()
#87 0x622f3652 in ?? ()
#88 0x2f3a6e69 in ?? ()
#89 0x656d6f68 in ?? ()
#90 0x74616d2f in ?? ()
#91 0x69622f74 in ?? ()
#92 0x4554006e in ?? ()
#93 0x783d4d52 in ?? ()
#94 0x6d726574 in ?? ()
#95 0x4f4c4200 in ?? ()
#96 0x49534b43 in ?? ()
#97 0x4b3d455a in ?? ()
#98 0x50544600 in ?? ()
#99 0x5341505f in ?? ()
#100 0x45564953 in ?? ()
#101 0x444f4d5f in ?? ()
#102 0x45593d45 in ?? ()
#103 0x48530053 in ?? ()
#104 0x3d4c4c45 in ?? ()
#105 0x6e69622f in ?? ()
#106 0x7363742f in ?? ()
#107 0x53530068 in ?? ()
#108 0x4c435f48 in ?? ()
#109 0x544e4549 in ?? ()
#110 0x3239313d in ?? ()
#111 0x3836312e in ?? ()
#112 0x312e372e in ?? ()
#113 0x35203130 in ?? ()
#114 0x39323230 in ?? ()
#115 0x00323220 in ?? ()
#116 0x5f485353 in ?? ()
#117 0x4e4e4f43 in ?? ()
#118 0x49544345 in ?? ()
#119 0x313d4e4f in ?? ()
#120 0x312e3239 in ?? ()
#121 0x372e3836 in ?? ()
#122 0x3130312e in ?? ()
#123 0x32303520 in ?? ()
#124 0x31203932 in ?? ()
#125 0x312e3239 in ?? ()
#126 0x372e3836 in ?? ()
#127 0x3220352e in ?? ()
#128 0x53530032 in ?? ()
#129 0x54545f48 in ?? ()
#130 0x642f3d59 in ?? ()
#131 0x742f7665 in ?? ()
#132 0x31707974 in ?? ()
#133 0x534f4800 in ?? ()
#134 0x50595454 in ?? ()
#135 0x72463d45 in ?? ()
#136 0x53426565 in ?? ()
#137 0x45560044 in ?? ()
#138 0x524f444e in ?? ()
#139 0x746e693d in ?? ()
#140 0x4f006c65 in ?? ()
#141 0x50595453 in ?? ()
#142 0x72463d45 in ?? ()
#143 0x53426565 in ?? ()
#144 0x414d0044 in ?? ()
#145 0x59544843 in ?? ()
#146 0x693d4550 in ?? ()
#147 0x00363833 in ?? ()
#148 0x564c4853 in ?? ()
#149 0x00313d4c in ?? ()
#150 0x3d445750 in ?? ()
#151 0x6d6f682f in ?? ()
#152 0x616d2f65 in ?? ()
#153 0x732f7474 in ?? ()
#154 0x65766569 in ?? ()
#155 0x4f524700 in ?? ()
#156 0x773d5055 in ?? ()
#157 0x6c656568 in ?? ()
#158 0x534f4800 in ?? ()
#159 0x61673d54 in ?? ()
#160 0x646f7073 in ?? ()
#161 0x616d2e65 in ?? ()
#162 0x6f667474 in ?? ()
#163 0x6e2e6472 in ?? ()
#164 0x52007465 in ?? ()
#165 0x544f4d45 in ?? ()
#166 0x534f4845 in ?? ()
#167 0x6f683d54 in ?? ()
#168 0x6d2e656d in ?? ()
#169 0x66747461 in ?? ()
#170 0x2e64726f in ?? ()
#171 0x0074656e in ?? ()
#172 0x54494445 in ?? ()
#173 0x653d524f in ?? ()
#174 0x41500065 in ?? ()
#175 0x3d524547 in ?? ()
#176 0x65726f6d in ?? ()
#177 0x4e494c00 in ?? ()
#178 0x323d5345 in ?? ()
#179 0x4f430034 in ?? ()
#180 0x4e4d554c in ?? ()
#181 0x30383d53 in ?? ()
#182 0x00000000 in ?? ()
#183 0x00000000 in ?? ()
#184 0x00000000 in ?? ()
#185 0x00000000 in ?? ()
#186 0x00000000 in ?? ()
#187 0x00000000 in ?? ()
#188 0x00000000 in ?? ()
#189 0x00000000 in ?? ()
#190 0x00000000 in ?? ()
#191 0x00000000 in ?? ()
#192 0x00000000 in ?? ()
#193 0x00000000 in ?? ()
#194 0x00000000 in ?? ()
#195 0x00000000 in ?? ()
#196 0x00000000 in ?? ()
#197 0x00000000 in ?? ()
#198 0x00000000 in ?? ()
#199 0x00000000 in ?? ()
#200 0x00000000 in ?? ()
#201 0x00000000 in ?? ()
#202 0x00000000 in ?? ()
#203 0x00000000 in ?? ()
#204 0x00000000 in ?? ()
#205 0x00000000 in ?? ()
#206 0x00000000 in ?? ()
#207 0x00000000 in ?? ()
#208 0x00000000 in ?? ()
#209 0x00000000 in ?? ()
#210 0x00000000 in ?? ()

CONTINUES AS ABOVE UNTIL

#1195 0x00000000 in ?? ()
#1196 0x00000000 in ?? ()
#1197 0x00000000 in ?? ()
#1198 0x00000000 in ?? ()
#1199 0x00000000 in ?? ()
#1200 0x00000000 in ?? ()
#1201 0x00000000 in ?? ()
#1202 0x00000000 in ?? ()
#1203 0x00000000 in ?? ()
#1204 0x00000000 in ?? ()
#1205 0x00000000 in ?? ()
#1206 0x00000000 in ?? ()
#1207 0x102454ff in ?? ()
#1208 0x2024448d in ?? ()
#1209 0x5440f750 in ?? ()
#1210 0x00020000 in ?? ()
#1211 0x688e0375 in ?? ()
#1212 0x01a1b814 in ?? ()
#1213 0xcd500000 in ?? ()
#1214 0x90feeb80 in ?? ()
#1215 0x102454ff in ?? ()
#1216 0x1424448d in ?? ()
#1217 0x5440f750 in ?? ()
#1218 0x00020000 in ?? ()
#1219 0x688e0375 in ?? ()
#1220 0x0158b814 in ?? ()
#1221 0xcd500000 in ?? ()
#1222 0x90feeb80 in ?? ()
#1223 0x102454ff in ?? ()
#1224 0x1424448d in ?? ()
#1225 0x1840f750 in ?? ()
#1226 0x00020000 in ?? ()
#1227 0x688e0375 in ?? ()
#1228 0x0067b844 in ?? ()
#1229 0xcd500000 in ?? ()
#1230 0x90feeb80 in ?? ()
#1231 0xbfbfec6c in ?? ()
#1232 0x00000001 in ?? ()
#1233 0x00000019 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(gdb) disassemble
Dump of assembler code for function _Znwj:
0x0807bd18 <_Znwj+0>: push %ebp
0x0807bd19 <_Znwj+1>: mov %esp,%ebp
0x0807bd1b <_Znwj+3>: push %ebx
0x0807bd1c <_Znwj+4>: sub $0x14,%esp
0x0807bd1f <_Znwj+7>: mov 0x8(%ebp),%ebx
0x0807bd22 <_Znwj+10>: test %ebx,%ebx
0x0807bd24 <_Znwj+12>: mov $0x1,%eax
0x0807bd29 <_Znwj+17>: cmove %eax,%ebx
0x0807bd2c <_Znwj+20>: mov %ebx,(%esp)
0x0807bd2f <_Znwj+23>: call 0x8098fe4 <malloc>
0x0807bd34 <_Znwj+28>: test %eax,%eax
0x0807bd36 <_Znwj+30>: jne 0x807bd90 <_Znwj+120>
0x0807bd38 <_Znwj+32>: mov 0x80b60f0,%eax
0x0807bd3d <_Znwj+37>: test %eax,%eax
0x0807bd3f <_Znwj+39>: jne 0x807bd6b <_Znwj+83>
0x0807bd41 <_Znwj+41>: movl $0x4,(%esp)
0x0807bd48 <_Znwj+48>: call 0x807adbc <__cxa_allocate_exception>
0x0807bd4d <_Znwj+53>: movl $0x809d3e0,(%eax)
0x0807bd53 <_Znwj+59>: movl $0x807bce2,0x8(%esp)
0x0807bd5b <_Znwj+67>: movl $0x809d3f0,0x4(%esp)
0x0807bd63 <_Znwj+75>: mov %eax,(%esp)
0x0807bd66 <_Znwj+78>: call 0x807bbfe <__cxa_throw>
0x0807bd6b <_Znwj+83>: call *%eax
0x0807bd6d <_Znwj+85>: mov %ebx,(%esp)
0x0807bd70 <_Znwj+88>: call 0x8098fe4 <malloc>
0x0807bd75 <_Znwj+93>: test %eax,%eax
0x0807bd77 <_Znwj+95>: je 0x807bd38 <_Znwj+32>
0x0807bd79 <_Znwj+97>: jmp 0x807bd90 <_Znwj+120>
0x0807bd7b <_Znwj+99>: cmp $0xffffffff,%edx
0x0807bd7e <_Znwj+102>: je 0x807bd88 <_Znwj+112>
0x0807bd80 <_Znwj+104>: mov %eax,(%esp)
0x0807bd83 <_Znwj+107>: call 0x8088f04 <_Unwind_Resume>
0x0807bd88 <_Znwj+112>: mov %eax,(%esp)
0x0807bd8b <_Znwj+115>: call 0x807ba46 <__cxa_call_unexpected>
0x0807bd90 <_Znwj+120>: add $0x14,%esp
0x0807bd93 <_Znwj+123>: pop %ebx
0x0807bd94 <_Znwj+124>: pop %ebp
0x0807bd95 <_Znwj+125>: ret
0x0807bd96 <_Znwj+126>: nop
0x0807bd97 <_Znwj+127>: nop
End of assembler dump.

Matt
11-16-2005, 07:05 AM
Here is the output from the non-static version of the regular BSD client.

[matt@gaspode:/home/matt/sieve] % gdb ./proth_sieve_bsd
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd"...
(gdb) run
Starting program: /usr/home/matt/sieve/proth_sieve_bsd

Program received signal SIGILL, Illegal instruction.
0x0807cca9 in operator new ()
(gdb) bt
#0 0x0807cca9 in operator new ()
#1 0x0805f134 in __gnu_cxx::__pool_alloc<true, 0>::_S_chunk_alloc ()
#2 0x0805f1d8 in __gnu_cxx::__pool_alloc<true, 0>::_S_refill ()
#3 0x0805f018 in __gnu_cxx::__pool_alloc<true, 0>::allocate ()
#4 0x0805f36b in std::allocator<char>::allocate ()
#5 0x08077988 in std::string::_Rep::_S_create ()
#6 0x0807727b in std::string::_S_construct<char const*> ()
#7 0x0807a16c in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string ()
#8 0x08058f23 in __static_initialization_and_destruction_0 ()
#9 0x0808b0ed in __do_global_ctors_aux ()
#10 0x08048ca2 in _init ()
#11 0x080490af in _start ()
#12 0x00000001 in ?? ()
(gdb) info registers
eax 0x1 1
ecx 0x1e0 480
edx 0x0 0
ebx 0x3c0 960
esp 0xbfbfea50 0xbfbfea50
ebp 0xbfbfea68 0xbfbfea68
esi 0x0 0
edi 0x18 24
eip 0x807cca9 0x807cca9
eflags 0x10206 66054
cs 0x1f 31
ss 0x2f 47
ds 0x2f 47
es 0x2f 47
fs 0x2f 47
gs 0x8f 143
(gdb) disassemble
Dump of assembler code for function _Znwj:
0x0807cc98 <_Znwj+0>: push %ebp
0x0807cc99 <_Znwj+1>: mov %esp,%ebp
0x0807cc9b <_Znwj+3>: push %ebx
0x0807cc9c <_Znwj+4>: sub $0x14,%esp
0x0807cc9f <_Znwj+7>: mov 0x8(%ebp),%ebx
0x0807cca2 <_Znwj+10>: test %ebx,%ebx
0x0807cca4 <_Znwj+12>: mov $0x1,%eax
0x0807cca9 <_Znwj+17>: cmove %eax,%ebx
0x0807ccac <_Znwj+20>: mov %ebx,(%esp)
0x0807ccaf <_Znwj+23>: call 0x8048d64 <malloc>
0x0807ccb4 <_Znwj+28>: test %eax,%eax
0x0807ccb6 <_Znwj+30>: jne 0x807cd10 <_Znwj+120>
0x0807ccb8 <_Znwj+32>: mov 0x80a3950,%eax
0x0807ccbd <_Znwj+37>: test %eax,%eax
0x0807ccbf <_Znwj+39>: jne 0x807cceb <_Znwj+83>
0x0807ccc1 <_Znwj+41>: movl $0x4,(%esp)
0x0807ccc8 <_Znwj+48>: call 0x807bd3c <__cxa_allocate_exception>
0x0807cccd <_Znwj+53>: movl $0x808e5e0,(%eax)
0x0807ccd3 <_Znwj+59>: movl $0x807cc62,0x8(%esp)
0x0807ccdb <_Znwj+67>: movl $0x808e5f0,0x4(%esp)
0x0807cce3 <_Znwj+75>: mov %eax,(%esp)
0x0807cce6 <_Znwj+78>: call 0x807cb7e <__cxa_throw>
0x0807cceb <_Znwj+83>: call *%eax
0x0807cced <_Znwj+85>: mov %ebx,(%esp)
0x0807ccf0 <_Znwj+88>: call 0x8048d64 <malloc>
0x0807ccf5 <_Znwj+93>: test %eax,%eax
0x0807ccf7 <_Znwj+95>: je 0x807ccb8 <_Znwj+32>
0x0807ccf9 <_Znwj+97>: jmp 0x807cd10 <_Znwj+120>
0x0807ccfb <_Znwj+99>: cmp $0xffffffff,%edx
0x0807ccfe <_Znwj+102>: je 0x807cd08 <_Znwj+112>
0x0807cd00 <_Znwj+104>: mov %eax,(%esp)
0x0807cd03 <_Znwj+107>: call 0x8089b48 <_Unwind_Resume>
0x0807cd08 <_Znwj+112>: mov %eax,(%esp)
0x0807cd0b <_Znwj+115>: call 0x807c9c6 <__cxa_call_unexpected>
0x0807cd10 <_Znwj+120>: add $0x14,%esp
0x0807cd13 <_Znwj+123>: pop %ebx
0x0807cd14 <_Znwj+124>: pop %ebp
0x0807cd15 <_Znwj+125>: ret
0x0807cd16 <_Znwj+126>: nop
0x0807cd17 <_Znwj+127>: nop
End of assembler dump.

Greenbank
11-16-2005, 07:15 AM
Matt,

cmove instruction again.

The C++ compiler that was used automatically used CMOV instructions.

The function being executed is the new operator for std::string (which is a core C++ library).

That binary was probably compiled on a machine that supported CMOV instructions and therefore the compiler used them.

I think the only option would be to get a recompiled binary with the right target architecture (i.e. -march=k6 or an even more basic -march=i486 or i586, something that disables CMOV).

Matt
11-16-2005, 07:19 AM
Another thing is that "file" tells me that the file is compiled "for FreeBSD 4.8" which means I need the compatability libraries for 4.x which I don't think I have. If a recompile is nessecary do we think it would be possible to compile for 5.x too?

Greenbank
11-16-2005, 07:47 AM
Who compiled the BSD binaries last time? Mikael?

Matt
11-16-2005, 01:24 PM
Sorry I don't know. I can give you access to a machine with FreeBSD 5.3 or 5.4 but I don't have any 6.0 machines yet.

Greenbank
11-16-2005, 01:32 PM
If I can get access (ssh preferably) then I should be able to help you. Drop me an email at (alex at greenbank dot org) and we can sort something out.

First I need to dig around in the gcc stuff that Mikael gave me. I can only compile proth_sieve under Linux on x86 with the Intel C compiler, and not gcc, due to the format of the inline assembly. Mikael gave me some tools to allow compilation with gcc but I haven't had a chance to look at them yet.

I also need to implement the minor bug fix that Mikael put in for me, it doesn't affect us now but if we find a prime for one of two k values (I forget which two) then proth_sieve hangs due to a full hash table.

Mikael compiled me new binaries (043) for Windows and Linux but I haven't tested them yet and he didn't give me the source with the latest fix in it although I know exactly what needs to be done.

Before anyone asks, NO they aren't faster. 1 tiny change was made to prevent a hash table becoming full and entering an infinite loop. I don't want to give them out because:

1) There is no need at the moment
2) They haven't been tested at all.

Matt
11-16-2005, 04:35 PM
I've emailed you with access information.

Matt
11-17-2005, 11:08 AM
Just a big thanks to Greenbank for being an absolute legend and compiling me a version that works on my computer, thanks very much!

Greenbank
11-17-2005, 12:11 PM
No worries, thanks for providing access to a FreeBSD machine.