Floating point exception (core dumped) ./ruby -ve 'r = Marshal.load("\x04\bU:\rRational[\ai\x06i\x0

e$B0J2<$N$h$&$K$9$k$He(B floating point exception e$B$K$J$j$^$9!#e(B

% ./ruby -ve ‘r = Marshal.load("\x04\bU:\rRational[\ai\x06i\x05"); r +
r’
ruby 1.9.0 (2008-04-28 revision 16229) [i686-linux]
-e:1: warning: useless use of + in void context
zsh: floating point exception (core dumped) ./ruby -ve ‘r =
Marshal.load("\x04\bU:\rRational[\ai\x06i\x05"); r + r’
% gdb ruby core.28086
GNU gdb 6.4.90-debian
Copyright © 2006 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 “i486-linux-gnu”…Using host libthread_db
library “/lib/tls/i686/cmov/libthread_db.so.1”.

warning: Can’t read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0…done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/librt.so.1…done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /lib/tls/i686/cmov/libdl.so.2…done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1…done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/libm.so.6…done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libc.so.6…done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2…Reading symbols from
/usr/lib/debug/lib/ld-2.3.6.so…done.
done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from
/home/akr/ruby/yarvo0/lib/ruby/1.9.0/i686-linux/enc/encdb.so…done.
Loaded symbols for
/home/akr/ruby/yarvo0/lib/ruby/1.9.0/i686-linux/enc/encdb.so
Reading symbols from
/home/akr/ruby/yarvo0/lib/ruby/1.9.0/i686-linux/enc/trans/transdb.so…done.
Loaded symbols for
/home/akr/ruby/yarvo0/lib/ruby/1.9.0/i686-linux/enc/trans/transdb.so
Core was generated by `./ruby -ve r =
Marshal.load("\x04\bU:\rRational[\ai\x06i\x05"); r + r’.
Program terminated with signal 8, Arithmetic exception.
#0 0x080acfb0 in f_addsub (self=135971680, anum=3, aden=1, bnum=3,
bden=1, k=43) at rational.c:632
632 VALUE a = f_imul(an, bd / ig);
(gdb) p an
$1 = 1
(gdb) p bd
$2 = 0
(gdb) p ig
$3 = 0
(gdb) bt
#0 0x080acfb0 in f_addsub (self=135971680, anum=3, aden=1, bnum=3,
bden=1, k=43) at rational.c:632
#1 0x080ace1d in nurat_add (self=135971680, other=135971680) at
rational.c:686
#2 0x0810b3ab in call_cfunc (func=0x80acd34 <nurat_add>,
recv=135971680, len=1, argc=1, argv=0xb7da7028)
at vm_insnhelper.c:288
#3 0x08112eb2 in vm_call_cfunc (th=0x81aa160, reg_cfp=0xb7e26f60,
num=1, id=43, recv=135971680, klass=136026260, flag=0,
mn=0x81b968c, blockptr=0x0) at vm_insnhelper.c:372
#4 0x081129fc in vm_call_method (th=0x81aa160, cfp=0xb7e26f60, num=1,
blockptr=0x0, flag=0, id=43, mn=0x81b9678,
recv=135971680, klass=136026260) at vm_insnhelper.c:504
#5 0x0810fc99 in vm_eval (th=0x81aa160, initial=0) at insns.def:1408
#6 0x0811308b in vm_eval_body (th=0x81aa160) at vm.c:1147
#7 0x081136e3 in rb_iseq_eval (iseqval=135971960) at vm.c:1356
#8 0x0805ba0f in ruby_exec_node (n=0x81ac478, file=0x0) at eval.c:227
#9 0x0805bab2 in ruby_run_node (n=0x81ac478) at eval.c:255
#10 0x08058b48 in main (argc=3, argv=0xbfea3864, envp=0xbfea3874) at
main.c:35
(gdb)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs