Bugs item #7603, was opened at 2007-01-05 20:33 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7603&group_id=426 Category: None Group: 1.8.5 Status: Open Resolution: None Priority: 3 Submitted By: Arkadiusz Miskiewicz (arekm) Assigned to: Nobody (None) Summary: miniruby segfaults while building ruby 1.8.5p2 on ppc/linux Initial Comment: segfaults randomly on this case: [builder2@forge ruby-1.8.5-p2]$ ./miniruby ./ext/extmk.rb /home/users/builder2/rpm/BUILD/ruby-1.8.5-p2/lib/mkmf.rb:887: [BUG] Segmentation fault ruby 1.8.5 (2006-12-04) [powerpc-linux] Aborted Configured as: $ ./configure LDFLAGS=-Wl,--as-needed CFLAGS=-O2 -fno-strict-aliasing -fwrapv -fsigned-char -gdwarf-2 -g2 CXXFLAGS=-O2 -fno-strict-aliasing -fwrapv -fsigned-cha r -gdwarf-2 -g2 FFLAGS=-O2 -fno-strict-aliasing -fwrapv -fsigned-char -gdwarf-2 -g2 CPPFLAGS= CC=ppc-pld-linux-gcc CXX=ppc-pld-linux-g++ --host=ppc-pld-linux --bu ild=ppc-pld-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/ usr/lib --libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --x-libraries=/usr/lib --enable-share d --enable-pthread gdb run: [builder2@forge ruby-1.8.5-p2]$ gdb --args ./miniruby ./ext/extmk.rb GNU gdb 6.6 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 "ppc-pld-linux"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) r Starting program: /home/users/builder2/rpm/BUILD/ruby-1.8.5-p2/miniruby ./ext/extmk.rb Program received signal SIGSEGV, Segmentation fault. scope_dup (scope=0x4a0) at eval.c:8100 8100 scope->flags |= SCOPE_DONT_RECYCLE; (gdb) print scope $1 = (struct SCOPE *) 0x4a0 (gdb) print scope->flags Cannot access memory at address 0x4b0 (gdb) where #0 scope_dup (scope=0x4a0) at eval.c:8100 #1 0x100188d8 in rb_call0 (klass=0, recv=0, id=0, oid=6561, argc=0, argv=0x0, body=0x0, flags=0) at eval.c:5966 #2 0x10018f08 in rb_call (klass=4160469360, recv=4160463456, mid=11401, argc=1, argv=0xffb9b5e0, scope=1) at eval.c:6048 #3 0x1001f6a8 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3458 #4 0x100227ec in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3173 #5 0x100206c0 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3624 #6 0x10018b28 in rb_call0 (klass=4160469360, recv=4160463456, id=11441, oid=0, argc=2, argv=0xffba25b0, body=0xf7f5f6d8, flags=-4597828) at eval.c:5954 #7 0x10018f08 in rb_call (klass=4160469360, recv=4160463456, mid=11441, argc=2, argv=0xffba25b0, scope=1) at eval.c:6048 #8 0x1001f6a8 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3458 #9 0x1001f480 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3437 #10 0x10020754 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3639 #11 0x10018b28 in rb_call0 (klass=4160469360, recv=4160463456, id=11001, oid=1, argc=0, argv=0x0, body=0xf7f489f8, flags=0) at eval.c:5954 #12 0x10018f08 in rb_call (klass=4160469360, recv=4160463456, mid=11001, argc=0, argv=0x0, scope=2) at eval.c:6048 #13 0x1001f820 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3464 #14 0x10026830 in rb_load (fname=4160225568, wrap=<value optimized out>) at eval.c:6843 #15 0x10026e60 in rb_require_safe (fname=4160383272, safe=0) at eval.c:7162 #16 0x10027044 in rb_f_require (obj=<value optimized out>, fname=1184) at eval.c:7046 #17 0x1000ff0c in call_cfunc (func=0xf7fa91a8, recv=114, len=<value optimized out>, argc=1476396066, argv=0x1001860c) at eval.c:5660 #18 0x10018bb8 in rb_call0 (klass=4160469192, recv=4160463456, id=9689, oid=4290428144, argc=1, argv=0xffbacce0, body=0xf7fa9118, flags=2) at eval.c:5810 #19 0x10018f08 in rb_call (klass=4160469192, recv=4160463456, mid=9689, argc=1, argv=0xffbacce0, scope=1) at eval.c:6048 #20 0x1001f6a8 in rb_eval (self=4160463456, n=<value optimized out>) at eval.c:3458 #21 0x10027270 in ruby_exec_internal () at eval.c:1604 #22 0x100272cc in ruby_exec () at eval.c:1624 #23 0x1002731c in ruby_run () at eval.c:1634 #24 0x1000c5d8 in main (argc=2, argv=0x1, envp=<value optimized out>) at main.c:46 (gdb) frame 1 #1 0x100188d8 in rb_call0 (klass=0, recv=0, id=0, oid=6561, argc=0, argv=0x0, body=0x0, flags=0) at eval.c:5966 5966 POP_SCOPE(); (gdb) l 5961 if (event_hooks) { 5962 EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass); 5963 } 5964 POP_VARS(); 5965 POP_CLASS(); 5966 POP_SCOPE(); 5967 ruby_cref = saved_cref; 5968 if (safe >= 0) ruby_safe_level = safe; 5969 switch (state) { 5970 case 0: (gdb) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7603&group_id=426