[#25936] [Bug:1.9] [rubygems] $LOAD_PATH includes bin directory — Nobuyoshi Nakada <nobu@...>

Hi,

10 messages 2009/10/05

[#25943] Disabling tainting — Tony Arcieri <tony@...>

Would it make sense to have a flag passed to the interpreter on startup that

16 messages 2009/10/05

[#26028] [Bug #2189] Math.atanh(1) & Math.atanh(-1) should not raise an error — Marc-Andre Lafortune <redmine@...>

Bug #2189: Math.atanh(1) & Math.atanh(-1) should not raise an error

14 messages 2009/10/10

[#26222] [Bug #2250] IO::for_fd() objects' finalization dangerously closes underlying fds — Mike Pomraning <redmine@...>

Bug #2250: IO::for_fd() objects' finalization dangerously closes underlying fds

11 messages 2009/10/22

[#26244] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context fails — Suraj Kurapati <redmine@...>

Bug #2258: Kernel#require inside rb_require() inside rb_protect() inside SysV context fails

24 messages 2009/10/22

[#26361] [Feature #2294] [PATCH] ruby_bind_stack() to embed Ruby in coroutine — Suraj Kurapati <redmine@...>

Feature #2294: [PATCH] ruby_bind_stack() to embed Ruby in coroutine

42 messages 2009/10/27

[#26371] [Bug #2295] segmentation faults — tomer doron <redmine@...>

Bug #2295: segmentation faults

16 messages 2009/10/27

[ruby-core:26245] [Bug #2258] Kernel#require inside rb_require() inside rb_protect() inside SysV context fails

From: Suraj Kurapati <redmine@...>
Date: 2009-10-23 00:20:53 UTC
List: ruby-core #26245
Issue #2258 has been updated by Suraj Kurapati.


Hi,

Below is the result of running the example test case attached
to this issue on the Ruby Issue Tracker with Ruby @ SVN trunk.

The only difference is that I see:

  [BUG] Segmentation fault

Instead of:

  [BUG] object allocation during garbage collection phase

Thanks for your consideration.

###############################################################
# ruby -v extconf.rb && sed -i 's,-shared,,g' Makefile
###############################################################

ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux]
checking for ruby_init() in -lruby-static... yes
checking for sys/ucontext.h... yes
creating Makefile

###############################################################
# make && ./main.so
###############################################################

gcc -I. -I/home/sun/app/ruby/include/ruby-1.9.1/i686-linux -I/home/sun/app/ruby/include/ruby-1.9.1/ruby/backward -I/home/sun/app/ruby/include/ruby-1.9.1 -I. -DHAVE_SYS_UCONTEXT_H  -D_FILE_OFFSET_BITS=64  -fPIC -g  -o main.o -c main.c
gcc  -o main.so main.o -L. -L/home/sun/app/ruby/lib -Wl,-R/home/sun/app/ruby/lib -L.  -rdynamic -Wl,-export-dynamic    -lruby-static  -lpthread -lrt -ldl -lcrypt -lm   -lc
Main: relay_from_main_to_ruby() begin
Ruby: context begin
Ruby: relay 0
Ruby: relay_from_ruby_to_main() begin
Main: relay_from_main_to_ruby() end
Main: relay_from_main_to_ruby() begin
Ruby: relay_from_ruby_to_main() end
Ruby: relay 1
Ruby: relay_from_ruby_to_main() begin
Main: relay_from_main_to_ruby() end
Main: relay_from_main_to_ruby() begin
Ruby: relay_from_ruby_to_main() end
Ruby: relay 2
Ruby: relay_from_ruby_to_main() begin
Main: relay_from_main_to_ruby() end
Main: relay_from_main_to_ruby() begin
Ruby: relay_from_ruby_to_main() end
Ruby: require 'hello' begin
~~~~> Hello World!  The time is 2009-10-22 17:17:08 -0700.
~~~~> Doing relay from /home/sun/lab/ruby-ucontext/hello.rb:3
Ruby: relay_from_ruby_to_main() begin
Main: relay_from_main_to_ruby() end
Main: relay_from_main_to_ruby() begin
Ruby: relay_from_ruby_to_main() end
~~~~> OMG, back from main!! :-)
/home/sun/lab/ruby-ucontext/hello.rb:7: [BUG] Segmentation fault
ruby 1.9.2dev (2009-10-23 trunk 25426) [i686-linux]

-- control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :require
c:0003 p:0080 s:0006 b:0006 l:000005 d:000005 TOP    /home/sun/lab/ruby-ucontext/hello.rb:7
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001bdc d:001bdc TOP   
---------------------------
/home/sun/lab/ruby-ucontext/hello.rb:7:in `<top (required)>'
/home/sun/lab/ruby-ucontext/hello.rb:7:in `require'

-- C level backtrace information -------------------------------------------
./main.so(rb_vm_bugreport+0x6b) [0x8150f7d]
./main.so [0x805fbe4]
./main.so(rb_bug+0x34) [0x805fc3e]
./main.so [0x80f1f22]
[0xb779640c]
./main.so [0x8071b4c]
./main.so [0x8071bd0]
./main.so [0x80732cd]
./main.so [0x8073514]
./main.so [0x80715ca]
./main.so(rb_newobj+0x52) [0x8071683]
./main.so(rb_node_newnode+0xb) [0x8071690]
./main.so [0x80b27da]
./main.so(ruby_yyparse+0x5d3e) [0x80a8209]
./main.so [0x80abf83]
./main.so(ruby_suppress_tracing+0xab) [0x815641c]
./main.so [0x80ac0d5]
./main.so(rb_parser_compile_file+0x75) [0x80ac4fa]
./main.so [0x80f0ba7]
./main.so(rb_ensure+0x5f) [0x80644f9]
./main.so [0x80f0c9d]
./main.so(rb_load_file+0x34) [0x80f0cd7]
./main.so [0x80659a9]
./main.so(rb_require_safe+0x136) [0x80664bf]
./main.so(rb_f_require+0x1a) [0x8065d59]
./main.so [0x813ee9b]
./main.so [0x813f832]
./main.so [0x813fd3d]
./main.so [0x8144196]
./main.so [0x814e674]
./main.so(rb_iseq_eval+0x2b) [0x814ecb6]
./main.so [0x8065a08]
./main.so(rb_require_safe+0x136) [0x80664bf]
./main.so(rb_require+0x56) [0x8066613]
./main.so(rb_protect+0xc4) [0x8064429]
./main.so [0x805d09f]
./main.so [0x805d211]
/lib/libc.so.6(makecontext+0x4b) [0xb75e803b]
./main.so [0x8203140]
/lib/libc.so.6(__libc_start_main+0xe6) [0xb75c4a36]
./main.so [0x805cf41]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

----------------------------------------
http://redmine.ruby-lang.org/issues/show/2258

----------------------------------------
http://redmine.ruby-lang.org

In This Thread