GC.stress = true; lambda(&lambda{})

e$B0J2<$N$h$&$KMn$A$^$9!#e(B

% ./ruby -ve ‘GC.stress = true; lambda(&lambda{})’
ruby 1.9.0 (2006-06-29) [i686-linux]
zsh: segmentation fault (core dumped) ./ruby -ve ‘GC.stress = true;
lambda(&lambda{})’
% gdb ruby core
GNU gdb 6.3-debian
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-linux”…Using host libthread_db
library “/lib/tls/libthread_db.so.1”.

Core was generated by `./ruby -ve GC.stress = true; lambda(&lambda{})’.
Program terminated with signal 11, Segmentation fault.

warning: current_sos: Can’t read pathname for load map: Input/output
error

Reading symbols from /lib/tls/libdl.so.2…Reading symbols from
/usr/lib/debug/lib/tls/libdl-2.3.2.so…done.
done.
Loaded symbols for /lib/tls/libdl.so.2
Reading symbols from /lib/tls/libcrypt.so.1…Reading symbols from
/usr/lib/debug/lib/tls/libcrypt-2.3.2.so…done.
done.
Loaded symbols for /lib/tls/libcrypt.so.1
Reading symbols from /lib/tls/libm.so.6…Reading symbols from
/usr/lib/debug/lib/tls/libm-2.3.2.so…done.
done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/tls/libc.so.6…Reading symbols from
/usr/lib/debug/lib/tls/libc-2.3.2.so…done.
done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2…Reading symbols from
/usr/lib/debug/lib/ld-2.3.2.so…done.
done.
Loaded symbols for /lib/ld-linux.so.2
#0 0x08065d22 in scope_dup (scope=0x0) at eval.c:8002
8002 scope->flags |= SCOPE_DONT_RECYCLE;
(gdb) bt
#0 0x08065d22 in scope_dup (scope=0x0) at eval.c:8002
#1 0x0806670e in proc_alloc (klass=3084230560, lambda=2) at eval.c:8279
#2 0x080667e8 in proc_lambda () at eval.c:8348
#3 0x0806ee1f in call_cfunc (func=0x80667cd <proc_lambda>,
recv=3084290580, len=0, argc=0, argv=0x0) at eval.c:5502
#4 0x08060f20 in rb_call0 (klass=3084295120, recv=3084290580, id=10081,
oid=10081, argc=0, argv=0x0, block=0x81708d8,
body=0xb7d59d0c, flags=18) at eval.c:5722
#5 0x08061c0d in rb_call (klass=3084295120, recv=3084290580, mid=10081,
argc=0, argv=0x0, block=0x81708d8,
scope=CALLING_FCALL, iter=0) at eval.c:5916
#6 0x0805b2cf in rb_eval (self=3084290580, n=0xb7d58600) at eval.c:3304
#7 0x08056574 in eval_node (self=3084290580, node=0xb7d58600) at
eval.c:1408
#8 0x08056b06 in ruby_exec_internal () at eval.c:1583
#9 0x08056b4d in ruby_exec () at eval.c:1598
#10 0x08056b88 in ruby_run () at eval.c:1614
#11 0x08054714 in main (argc=3, argv=0xbfa0ea14, envp=0xbfa0ea24) at
main.c:43
(gdb)

& e$B$KEO$7$?e(B Proc e$B%%V%8%’%/%H$NCf?H$Ne(B BLOCK
e$B$r;H$C$F$$$k$N$K!"e(B
e$B$=$Ne(B Proc e$B%
%V%8%’%/%H$,e(B
GCe$B$5$l$F$7$^$&$h$&$G!"$3$s$J$+$s$8e(B
e$B$G$9$+$M!#e(B

Index: eval.c

RCS file: /src/ruby/eval.c,v
retrieving revision 1.910
diff -u -r1.910 eval.c
— eval.c 28 Jun 2006 04:51:27 -0000 1.910
+++ eval.c 29 Jun 2006 09:44:13 -0000
@@ -2180,7 +2180,8 @@
MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
}
if (bpass) {\

  • block = passing_block(rb_eval(self, bpass->nd_body), &_block);\
  •    volatile VALUE save_block = rb_eval(self, bpass->nd_body); \
    
  • block = passing_block(save_block, &_block);
    }
    } while (0)

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:28902] GC.stress = true; lambda(&lambda{})”
on Thu, 29 Jun 2006 18:46:10 +0900, Tanaka A. [email protected]
writes:

|& e$B$KEO$7$?e(B Proc e$B%%V%8%’%/%H$NCf?H$Ne(B BLOCK e$B$r;H$C$F$$$k$N$K!"e(B
|e$B$=$Ne(B Proc e$B%
%V%8%’%/%H$,e(B GCe$B$5$l$F$7$^$&$h$&$G!"$3$s$J$+$s$8e(B
|e$B$G$9$+$M!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!#%3%_%C%H$7$F$/[email protected]$5$$!#e(B

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