segfault in spec/core/bignum
Reported by Charles Comstock | October 11th, 2007 @ 01:02 PM | in 1.0 preview
Running ubuntu gutsy I find the following error:
$ bin/mspec spec/core/bignum/
..F.FEE..F.FFAttempted to access field 4 in an object with 1 fields.
An error has occured: Segmentation fault (SIGSEGV)
VM Registers:
IP: 0000 SP: 0164
AC: 0001 AR: 0000
Exception: <ArgumentError:0xb73f15e4>
$ bin/mspec --gdb spec/core/bignum/
GNU gdb 6.6-debian
Copyright (C) 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"...
/dev/null: No such file or directory.
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /home/clgc/rubinius/shotgun/rubinius.bin -Ispec -rmini_rspec.rb -rmini_mock.rb last_mspec.rb
[Thread debugging using libthread_db enabled]
[New Thread -1212893520 (LWP 6828)]
F.F.FEE..F...Attempted to access field 4 in an object with 1 fields.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212893520 (LWP 6828)]
baker_gc_mutate_from (state=0x804b0b0, g=0x805b1c0, orig=134659084) at baker.c:193
193 mut = baker_gc_maybe_mutate(state, g, tmp);
(gdb) bt
#0 baker_gc_mutate_from (state=0x804b0b0, g=0x805b1c0, orig=134659084) at baker.c:193
#1 0xb7e18dab in baker_gc_collect (state=0x804b0b0, g=0x805b1c0, roots=0x84c33d8) at baker.c:416
#2 0xb7e7b98a in object_memory_collect (state=0x804b0b0, om=0x805b188, roots=0x84c33d8) at object_memory.c:233
#3 0xb7e7ff15 in state_collect (state=0x804b0b0, c=0x806b740) at state.c:63
#4 0xb7e38bb2 in cpu_run (state=0x804b0b0, ic=0x806b740, setup=0) at cpu_instructions.c:1025
#5 0xb7e75f6f in machine_run (m=0x804b008) at machine.c:507
#6 0xb7e76288 in machine_run_file (m=0x804b008, path=0x80491a0 "runtime/loader.rbc") at machine.c:532
#7 0x08048bd5 in main (argc=5, argv=0xbfe911a4) at main.c:115
(gdb) rbt
0xb7249048 Class#===+0 in kernel/core/class.rb:0
0xb734bdec SpecRunner#it+91 in spec/mini_rspec.rb:342
0xb734be3c Object#it+28 in spec/mini_rspec.rb:382
0xb734bcac <none>#<block>+215 in spec/core/bignum/bit_and_spec.rb:7
0xb734bcfc Proc#call+55 in kernel/core/context.rb:262
0xb734bd4c SpecRunner#describe+32 in spec/mini_rspec.rb:359
0xb734bd9c Object#describe+28 in spec/mini_rspec.rb:378
0xb734bb54 Class#__script__+224 in spec/core/bignum/bit_and_spec.rb:4
0xb734bba4 Kernel#load+281 in kernel/core/compile.rb:78
0xb734bc0c <none>#<block>+149 in last_mspec.rb:9
0xb734bc5c <none>#<block>+34 in kernel/core/array.rb:549
0xb734a130 Integer#times+22 in kernel/core/integer.rb:14
0xb734a180 Array#each+42 in kernel/core/array.rb:549
0xb734a1d0 Class#__script__+250 in last_mspec.rb:5
0xb73491c8 Kernel#load+439 in kernel/core/compile.rb:95
0xb7349280 Class#__script__+1188 in kernel/loader.rb:125
$1 = void
Comments and changes to this ticket
-

Jeremy Roach October 11th, 2007 @ 02:33 PM
this is where the segfault happens when i run the same spec
diff --git a/shotgun/lib/baker.c b/shotgun/lib/baker.c index 45204f1..415d337 100644 --- a/shotgun/lib/baker.c +++ b/shotgun/lib/baker.c @@ -210,6 +210,7 @@ static inline void _mutate_references(STATE, baker_gc g, OBJECT iobj) { /* We cache the bytecode in a char*, so adjust it. We mutate the data first so we cache the newest address. */ OBJECT ba; + assert(CMETHOD_f_BYTECODES < NUM_FIELDS(fc->method)); ba = cmethod_get_bytecodes(fc->method); ba = baker_gc_maybe_mutate(state, g, ba); -
Charles Comstock October 14th, 2007 @ 03:31 PM
- → State changed from open to resolved
Appears to be fixed by http://git.rubini.us/?p=code;a=c...
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
