--mimepart_4d4c0293be826_1dc2af5f546245e5
Content-Type: text/plain
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline

Bug #4367: Thread.kill segfaults when the object to be killed isn't a thread
http://redmine.ruby-lang.org/issues/show/4367

Author: Andrew Grimm
Status: Open, Priority: Normal
ruby -v: ruby 1.9.3dev (2011-01-29 trunk 30720) [x86_64-darwin10.4.0] If something other than a thread is supplied to Thread.kill, a segfault occurs. For example, Thread.kill(nil) causes a segfault:

Andrew-Grimms-MacBook-Pro:~ agrimm$ ruby
Thread.kill(nil)
-:1: [BUG] Segmentation fault
ruby 1.9.3dev (2011-01-29 trunk 30720) [x86_64-darwin10.4.0]

-- Control frame information -----------------------------------------------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :kill
c:0003 p:0016 s:0006 b:0006 l:002358 d:000798 EVAL   -:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002358 d:002358 TOP   -- Ruby level backtrace information ----------------------------------------
-:1:in `<main>'
-:1:in `kill'

-- See Crash Report log file under ~/Library/Logs/CrashReporter or ---------
-- /Library/Logs/CrashReporter, for the more detail of ---------------------
-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

* Loaded script: -

* Loaded features:

    0 enumerator.so
    1 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/x86_64-darwin10.4.0/enc/encdb.bundle
    2 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/x86_64-darwin10.4.0/enc/trans/transdb.bundle
    3 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems/defaults.rb
    4 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/x86_64-darwin10.4.0/rbconfig.rb
    5 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/thread.rb
    6 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems/exceptions.rb
    7 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems/custom_require.rb
    8 /Users/agrimm/.rvm/rubies/ruby-head/lib/ruby/1.9.1/rubygems.rb

[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

Abort trap


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

--mimepart_4d4c0293be826_1dc2af5f546245e5
Content-Type: application/octet-stream; name=ruby_2011-02-05-003336_Andrew-Grimms-MacBook-Pro.crash
Content-Transfer-Encoding: Base64
Content-Disposition: attachment; filename=ruby_2011-02-05-003336_Andrew-Grimms-MacBook-Pro.crash

UHJvY2VzczogICAgICAgICBydWJ5IFs2MDcyXQpQYXRoOiAgICAgICAgICAg
IC9Vc2Vycy9hZ3JpbW0vLnJ2bS9ydWJpZXMvcnVieS1oZWFkL2Jpbi9ydWJ5
CklkZW50aWZpZXI6ICAgICAgcnVieQpWZXJzaW9uOiAgICAgICAgID8/PyAo
Pz8/KQpDb2RlIFR5cGU6ICAgICAgIFg4Ni02NCAoTmF0aXZlKQpQYXJlbnQg
UHJvY2VzczogIGJhc2ggWzMxMTddCgpEYXRlL1RpbWU6ICAgICAgIDIwMTEt
MDItMDUgMDA6MzM6MzUuOTkyICsxMTAwCk9TIFZlcnNpb246ICAgICAgTWFj
IE9TIFggMTAuNi40ICgxMEY1NjkpClJlcG9ydCBWZXJzaW9uOiAgNgoKRXhj
ZXB0aW9uIFR5cGU6ICBFWENfQkFEX0FDQ0VTUyAoU0lHQUJSVCkKRXhjZXB0
aW9uIENvZGVzOiBLRVJOX0lOVkFMSURfQUREUkVTUyBhdCAweDAwMDAwMDAw
MDAwMDAwMjQKQ3Jhc2hlZCBUaHJlYWQ6ICAwICBEaXNwYXRjaCBxdWV1ZTog
Y29tLmFwcGxlLm1haW4tdGhyZWFkCgpBcHBsaWNhdGlvbiBTcGVjaWZpYyBJ
bmZvcm1hdGlvbjoKYWJvcnQoKSBjYWxsZW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