From: h.shirosaki@...
Date: 2014-08-07T08:16:21+00:00
Subject: [ruby-core:64240] [ruby-trunk - Bug #8000] "require 'tk'" segfaults on 64-bit linux with Tk 8.6

Issue #8000 has been updated by Hiroshi Shirosaki.

File 0001-Fix-tk-crash-with-Tk-8.6.1-on-Ubuntu.patch added

I see the crash with ruby trunk and Tk 8.6.1 on Ubuntu Linux x86_64.
It seems calling `__orig_namespace_command__` causes access violation. `objClientData` memory looks freed.
Instead using `rename` command to create `__orig_namespace_command__` works without crash.
I tested it with some files in ext/tk/sample.
I attached a patch.

----------------------------------------
Bug #8000: "require 'tk'" segfaults on 64-bit linux with Tk 8.6
https://bugs.ruby-lang.org/issues/8000#change-48230

* Author: Ed McCardell
* Status: Open
* Priority: Normal
* Assignee: Hidetoshi Nagai
* Category: 
* Target version: 
* ruby -v: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
* Backport: 
----------------------------------------
Using ruby 1.9.3p392 and Tk 8.6.0 on 64-bit Arch Linux, attempting to "require 'tk'" causes a segfault.

To reproduce:
    ruby -e "require 'tk'"

The crash log is in the attached file.

Notes:
- I've heard from a Gentoo user who is having the same problem.
- On 32-bit Arch Linux, there is no problem.

---Files--------------------------------
crash.log (16.2 KB)
bt.txt (1.82 KB)
bt-debug.txt (4.47 KB)
crash-2.txt (4.49 KB)
0001-Fix-tk-crash-with-Tk-8.6.1-on-Ubuntu.patch (2.36 KB)


-- 
https://bugs.ruby-lang.org/