Bug #6215
closedprint "#{RUBY_PATCHLEVEL.slice(2,3)}\n" results in crash
Description
While using Ruby 1.9.3 and Textmate, I attempted to run the following code fragment:
print "#{RUBY_VERSION}\n"
print "#{RUBY_PLATFORM}\n"
print "#{RUBY_RELEASE_DATE}\n"
print "#{RUBY_PATCHLEVEL.slice(2,3)}\n"}
When executing the line print #{RUBY_PATCHLEVEL.slice(2,3), the Ruby interpreter crashed as outlined in the attached files.
Files
Updated by nobu (Nobuyoshi Nakada) about 12 years ago
- Status changed from Open to Feedback
- Priority changed from Normal to 3
=begin
Seems very strange.
(({RUBY_PATCHLEVEL})) is a (({Fixnum})) and has no (({slice})) method, so (({NoMethodError})) occurs on my machine.
What happens with just:
p RUBY_PATCHLEVEL
?
=end
Updated by drbrain (Eric Hodel) almost 12 years ago
According to the crash report, the crash occurs while textmate is handling the NoMethodError, perhaps while reformatting the backtrace.
Updated by mame (Yusuke Endoh) over 11 years ago
- Status changed from Feedback to Assigned
- Assignee set to sorah (Sorah Fukumori)
Anyone can reproduce? Sorah-don, could you give it a try?
I think that textmate looks irrelevant in the following trace.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8f0f1ce2 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8f29c7d2 pthread_kill + 95
2 libsystem_c.dylib 0x00007fff8f28da7a abort + 143
3 libruby.1.9.1.dylib 0x000000010bd7e7d4 rb_bug + 212
4 libruby.1.9.1.dylib 0x000000010be476bf sigsegv + 127
5 libsystem_c.dylib 0x00007fff8f2eecfa _sigtramp + 26
6 libruby.1.9.1.dylib 0x000000010beac7a8 rb_backref_get + 72 (vm_insnhelper.c:978)
7 libruby.1.9.1.dylib 0x000000010be1f36f rb_reg_search + 207 (re.c:1358)
8 libruby.1.9.1.dylib 0x000000010be640af rb_str_sub_bang + 271 (string.c:3613)
9 libruby.1.9.1.dylib 0x000000010be64a44 rb_str_sub + 180 (string.c:3733)
10 libruby.1.9.1.dylib 0x000000010bec5257 vm_call_method + 999 (vm_insnhelper.c:404)
11 libruby.1.9.1.dylib 0x000000010beb334f vm_exec_core + 18767 (insns.def:1015)
12 libruby.1.9.1.dylib 0x000000010beb7fb3 vm_exec + 1459 (vm.c:1220)
13 libruby.1.9.1.dylib 0x000000010beb931d rb_vm_invoke_proc + 877 (vm.c:624)
14 libruby.1.9.1.dylib 0x000000010bd8594c rb_exec_end_proc + 316 (eval_jump.c:128)
15 libruby.1.9.1.dylib 0x000000010bd85a65 ruby_finalize_0 + 101 (eval.c:93)
16 libruby.1.9.1.dylib 0x000000010bd85ba0 ruby_cleanup + 304 (eval.c:135)
17 libruby.1.9.1.dylib 0x000000010bd85ef3 ruby_run_node + 67 (eval.c:244)
18 ruby 0x000000010bd2eedf main + 79 (main.c:40)
19 ruby 0x000000010bd2ee84 start + 52
--
Yusuke Endoh mame@tsg.ne.jp
Updated by naruse (Yui NARUSE) about 11 years ago
- Target version changed from 1.9.3 to 2.6
Updated by mame (Yusuke Endoh) over 5 years ago
- Status changed from Assigned to Rejected
Closing. Please reopen if anyone could reproduce the bug.