[#85349] [Ruby trunk Bug#14334] Segmentation fault after running rspec (ruby/2.5.0/erb.rb:885 / simplecov/source_file.rb:85) — pragtob@...
Issue #14334 has been updated by PragTob (Tobias Pfeiffer).
3 messages
2018/02/02
[#85358] Re: [ruby-cvs:69220] nobu:r62039 (trunk): compile.c: unnecessary freezing — Eric Wong <normalperson@...>
[email protected] wrote:
5 messages
2018/02/03
[#85612] Why require autoconf 2.67+ — leam hall <leamhall@...>
Please pardon the intrusion; I am new to Ruby and like to pull the
6 messages
2018/02/17
[#85616] Re: Why require autoconf 2.67+
— Vít Ondruch <v.ondruch@...>
2018/02/18
VGhpcyBjb3VsZCBoZWxwIHlvdSB0byBidWlsZCBSdWJ5IHdpdGggb2xkZXIgYXV0b2NvbmYgKDIu
[#85634] [Ruby trunk Bug#14494] [PATCH] tool/m4/ruby_replace_type.m4 use AC_CHECK_TYPES for HAVE_* macros — normalperson@...
Issue #14494 has been reported by normalperson (Eric Wong).
3 messages
2018/02/19
[#85674] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — matz@...
Issue #13618 has been updated by matz (Yukihiro Matsumoto).
5 messages
2018/02/20
[#85686] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2018/02/20
[email protected] wrote:
[#85704] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Koichi Sasada <ko1@...>
2018/02/21
On 2018/02/20 18:06, Eric Wong wrote:
[ruby-core:85706] [Ruby trunk Bug#14421] super_method segfaults when called on a re-bound Method
From:
naruse@...
Date:
2018-02-21 04:36:08 UTC
List:
ruby-core #85706
Issue #14421 has been updated by naruse (Yui NARUSE).
Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE
ruby_2_5 r62507 merged revision(s) 62115.
----------------------------------------
Bug #14421: super_method segfaults when called on a re-bound Method
https://bugs.ruby-lang.org/issues/14421#change-70510
* Author: rusterholz (Andy Rusterholz)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE
----------------------------------------
The line of code below causes a segfault on 2.5.0.
This appears to possibly be related to #[[11419]], but is not the same.
The segfault is not limited to the String class used in the example; it can be reproduced with any class with at least one instance_method. More generally, it can be reproduced any time `super_method` is called on a Method which was formed by (validly) calling `bind` on an UnboundMethod.
~~~
$ ruby -e 'String.instance_method(:length).bind(String.new).super_method'
-e:1: [BUG] Segmentation fault at 0x0000000000000018
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
-- Control frame information -----------------------------------------------
c:0003 p:---- s:0010 e:000009 CFUNC :super_method
c:0002 p:0028 s:0006 e:000005 EVAL -e:1 [FINISH]
c:0001 p:0000 s:0003 E:001570 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `super_method'
-- Machine register context ------------------------------------------------
rax: 0x0000000000000000 rbx: 0x00007fc51f43e1e0 rcx: 0x0000000108308730
rdx: 0x0000000000000000 rdi: 0x00007fc52106fd18 rsi: 0x0000000108308730
rbp: 0x00007ffee7b78f80 rsp: 0x00007ffee7b78f40 r8: 0x00007fc51f4623b8
r9: 0x0000000108543fa0 r10: 0x00007fc51f5070e8 r11: 0x0000000000000016
r12: 0x0000000000000000 r13: 0x00007fc51f541860 r14: 0x0000000000000000
r15: 0x00007fc52106fd18 rip: 0x000000010819a2eb rfl: 0x0000000000010246
-- C level backtrace information -------------------------------------------
0 libruby.2.5.dylib 0x0000000108274d17 rb_vm_bugreport + 135
1 libruby.2.5.dylib 0x00000001080f9988 rb_bug_context + 472
2 libruby.2.5.dylib 0x00000001081e9161 sigsegv + 81
3 libsystem_platform.dylib 0x00007fff7e2c0f5a _sigtramp + 26
4 libruby.2.5.dylib 0x000000010819a2eb method_super_method + 43
5 libruby.2.5.dylib 0x00000001082681fb vm_call_cfunc + 283
6 libruby.2.5.dylib 0x0000000108251954 vm_exec_core + 12196
7 libruby.2.5.dylib 0x0000000108262ace vm_exec + 142
8 libruby.2.5.dylib 0x0000000108103501 ruby_exec_internal + 177
9 libruby.2.5.dylib 0x00000001081033f8 ruby_run_node + 56
10 ruby 0x0000000108086f2f main + 79
-- Other runtime information -----------------------------------------------
* Loaded script: -e
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/x86_64-darwin17/enc/encdb.bundle
5 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/x86_64-darwin17/enc/trans/transdb.bundle
6 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/x86_64-darwin17/rbconfig.rb
7 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/compatibility.rb
8 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/defaults.rb
9 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/deprecate.rb
10 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/errors.rb
11 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/version.rb
12 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/requirement.rb
13 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/platform.rb
14 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/basic_specification.rb
15 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/stub_specification.rb
16 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/util/list.rb
17 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/x86_64-darwin17/stringio.bundle
18 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/specification.rb
19 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/exceptions.rb
20 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/dependency.rb
21 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_gem.rb
22 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/monitor.rb
23 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb
24 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems.rb
25 /Users/rusterholz/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/path_support.rb
~~~
**Expected Results:** Given that `String.new.method(:length).super_method` correctly returns nil, I would expect `String.instance_method(:length).bind(String.new).super_method` to also return nil.
---Files--------------------------------
ruby_2018-01-29-102259_arusterholz-mbp15-9.crash (35.9 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>