Project

General

Profile

Actions

Bug #8230

closed

Segmentation fault: at_exit

Added by gojpeg (Peter Leonov) about 11 years ago. Updated over 9 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
Backport:
[ruby-core:54068]

Description

Got segfault usin TextMate run script window. Thought it up to TextMate and started to digg.
Ended up with heisenbug in at_exit.

STEPS:

Download two files:

  • at_exit.rb
  • big_file.rb

save these to some dir, chdir there and run:

ruby -r ./at_exit.rb -e 'q'

EXPECTED:

Error message like this:

-e:1:in `<main>': undefined local variable or method `q' for main:Object (NameError)

RESULT:

A segmentation fault. Output of the crash can be found in crash-output.txt attached below.

NOTES:

I have gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00).

If you look at the content of the files you could see lots of useless statements. It is OK, bug shows itself with all that garbage only.

While Ruby 2.0 couldn't be built on Mac OS X today I can't test this issue in it. But, it is ease to see about this bug it is all about stack corruption. If necessary, I can help with debugging on my box.


Files

at_exit.rb (545 Bytes) at_exit.rb gojpeg (Peter Leonov), 04/07/2013 08:43 AM
big_file.rb (21.4 KB) big_file.rb gojpeg (Peter Leonov), 04/07/2013 08:43 AM
crash-output.txt (1.43 KB) crash-output.txt gojpeg (Peter Leonov), 04/07/2013 08:43 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0