Forum: Ruby-core [Open] Ruby interpreter crashes when executing a script in debug mode

D40a2ed2c609eb46fdfcdd383659db8f?d=identicon&s=25 unknown (Guest)
on 2014-02-25 22:32
(Received via mailing list)
Issue #9568 has been reported by Scott Thompson.

Bug #9568: Ruby interpreter crashes when executing a script in debug

* Author: Scott Thompson
* Status: Open
* Priority: Normal
* Assignee:
* Category:
* Target version:
* ruby -v: ruby 2.2.0dev (2014-02-26 trunk 45176) [x86_64-darwin13.0]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
The following script will crash the ruby interpreter when ruby is run in
debug mode.
This script is creating mock HTTP objects and creating the Response
class out of the middle of the Savon gem and calling a private method in
a very odd way because it is a reduced test case pulled from a much
larger script.  The actual script use Savon in a much more conventional

-- crash_example.rb --
require 'savon'

class SampleHTTPStuff
  def error?
    return true

  def code
    return 500

  def body
    return %q{<?xml version="1.0" encoding="UTF-8"?>

http =
response =, {}, {})

  response.instance_eval { raise_soap_and_http_errors! }
rescue => e
  puts "Ouch!"

--- end of crash_example.rb

For what it's worth, I'm using version 2.3.3 of the Savon gem.

If I run this using:

ruby -d crash_example.rb

I get a segmentation fault error.  The problem appears to be the result
of calling vm_throw with the "throwobj" having the value 0x8

If I run the script without the "-d" debug flag, the script runs without

I am running this on Mac OS X 10.9.1 on a MacBook Pro Retina 15"

using RVM I have tried the same code on 2.0, 2.1, and the 2.2dev head
(as of 2/25/2014).  They all exhibit the same behavior

I've attached a transcript file of the code being run.

crash_transcript.txt (35.1 KB)
This topic is locked and can not be replied to.