Project

General

Profile

Actions

Bug #13297

closed

SIGSEGV on ruby exit after `require 'tk'`

Added by graywolf (Gray Wolf) about 7 years ago. Updated about 7 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
[ruby-core:79981]

Description

I get SIGSEGV when exiting ruby after I required tk. Everything seems to work fine though, crash is only when exiting.

Here is smallest possible script I managed to reproduce issue with:

require 'tk'

I've compiled ruby without -O3 to better output from debugger and this is the result:

$ lldb ./ruby /tmp/test.rb 
(lldb) target create "./ruby"
Current executable set to './ruby' (x86_64).
(lldb) settings set -- target.run-args  "/tmp/test.rb"
(lldb) run
Process 4376 launched: './ruby' (x86_64)
Process 4376 stopped
* thread #3: tid = 4380, 0x00005555556d6072 ruby`vm_call0_body(th=0x0000555555fb0760, calling=0x00007ffff307f0c0, ci=0x00007ffff307f0b0, cc=0x00007ffff307f0e0, argv=0x0000000000000000) + 35 at vm_eval.c:158, name = 'tk.rb:1243', stop reason = signal SIGSEGV: address access protected (fault address: 0x7ffff307eff8)
    frame #0: 0x00005555556d6072 ruby`vm_call0_body(th=0x0000555555fb0760, calling=0x00007ffff307f0c0, ci=0x00007ffff307f0b0, cc=0x00007ffff307f0e0, argv=0x0000000000000000) + 35 at vm_eval.c:158
   155 	{
   156 	    VALUE ret;
   157 	
-> 158 	    calling->block_handler = vm_passed_block_handler(th);
   159 	
   160 	  again:
   161 	    switch (cc->me->def->type) {

Since it's inside vm_eval.c, does this mean there is some problem with ruby and not with the tk gem? I know basically nothing about ruby insides, so I'm kinda lost as to what should I do to fix this :/


Files

gdb.txt (562 KB) gdb.txt backtrace graywolf (Gray Wolf), 03/09/2017 01:42 PM

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

  • Status changed from Open to Third Party's Issue

It's a bug in ext/tk, that calling rb_exc_raise instead of rb_jump_tag on TAG_FATAL.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0