[BUG] run with -rprofile -rtest/unit


#1

ruby-1.9/cygwin e$B$G<!$NDL$j0[>o=*N;$7$^$9!#e(B
e$B$7$+$7<j85$Ne(Blinuxe$B>e$G$O!":#$N$H$3$m:F8=$7$^$;$s$G$7$?!#e(B

~$ ruby-1.9 -rprofile -rtest/unit -e ‘’
/usr/local/lib/ruby/1.9/optparse.rb:852: [BUG] Segmentation fault
ruby 1.9.0 (2006-05-11) [i386-cygwin]

#0 0x7c94eb94 in ntdll!LdrAccessResource ()
#1 0x7c94e9c0 in ntdll!ZwWaitForSingleObject ()
#2 0x7c8025db in WaitForSingleObjectEx () from /home/ttate/kernel32.dll
#3 0x0000073c in ?? ()
#4 0x00000000 in ?? () from


#2

On May 11, 2006, at 10:14 AM, Takaaki T. wrote:

#2 0x7c8025db in WaitForSingleObjectEx () from /home/ttate/
kernel32.dll
#3 0x0000073c in ?? ()
#4 0x00000000 in ?? () from

$ uname -a
Darwin kaa.coop.robotcoop.com 8.6.0 Darwin Kernel Version 8.6.0: Tue
Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power
Macintosh powerpc
$ ruby19 -v -rprofile -rtest/unit -e ‘’
ruby 1.9.0 (2006-05-10) [powerpc-darwin8.6.0]
/usr/local/lib/ruby/1.9/optparse.rb:852: malloc: possible integer
overflow (ArgumentError)
from /usr/local/lib/ruby/1.9/optparse.rb:852:in add_officious' from /usr/local/lib/ruby/1.9/optparse.rb:851:inadd_officious’
from /usr/local/lib/ruby/1.9/optparse.rb:844:in initialize' from /usr/local/lib/ruby/1.9/test/unit/autorunner.rb:101:inoptions’
from /usr/local/lib/ruby/1.9/test/unit/autorunner.rb:88:in
Test::Unit::AutoRunner#process_args' from /usr/local/lib/ruby/1.9/test/unit/autorunner.rb:10:inTest::Unit::AutoRunner#run’
from /usr/local/lib/ruby/1.9/test/unit.rb:276
% cumulative self self total
time seconds seconds calls ms/call ms/call name
[profile output]
ruby19(2246) malloc: *** Deallocation of a pointer not malloced:
0x27df58; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug
/usr/local/lib/ruby/1.9/profiler.rb:30: [BUG] Bus Error
ruby 1.9.0 (2006-05-10) [powerpc-darwin8.6.0]

Abort trap (core dumped)
$ gdb which ruby19 /cores/core.2246
GNU gdb 6.1-20040303 (Apple version gdb-434) (Wed Nov 2 17:28:16 GMT
2005)
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 “powerpc-apple-darwin”…Reading symbols
for shared libraries … done

Core was generated by `/usr/local/bin/ruby19’.
#0 0x90047e4c in kill ()
(gdb) bt
#0 0x90047e4c in kill ()
#1 0x9012dff4 in abort ()
#2 0x000416dc in rb_bug (fmt=0xaeab0 “Bus Error”) at error.c:167
#3 0x0006fd6c in sigbus (sig=0) at signal.c:488
#4
#5 blk_free (data=0xbfff4300) at eval.c:7933
#6 0x0001ec9c in rb_gc_call_finalizer_at_exit () at gc.c:1896
#7 0x00003a34 in ruby_finalize_1 () at eval.c:1481
#8 0x0000af7c in ruby_cleanup (ex=0) at eval.c:1516
#9 0x0000b004 in ruby_stop (ex=12) at eval.c:1558
#10 0x0001c740 in ruby_run () at eval.c:1570
#11 0x00002f34 in main (argc=6, argv=0xbffff838, envp=0x15) at main.c:43
(gdb) f 5
#5 blk_free (data=0xbfff4300) at eval.c:7933
7933 frame = frame->prev;
(gdb) list
7928 struct FRAME *tmp;
7929
7930 frame = frame->prev;
7931 while (frame) {
7932 tmp = frame;
7933 frame = frame->prev;
7934 free(tmp);
7935 }
7936 }
7937
(gdb)


Eric H. - removed_email_address@domain.invalid - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com