Issue #12462 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE

ruby_2_3 r55774 merged revision(s) 55297.

----------------------------------------
Bug #12462: Segmentation fault hapen when calling Proc that has return
https://bugs.ruby-lang.org/issues/12462#change-59839

* Author: Shinta Koyanagi
* Status: Closed
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
* Backport: 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE
----------------------------------------
Hi.
Is this bug?

I execute it.

~~~
ruby -ve "def x; Proc.new { return 1 }.tap(&:call); end; p x"
~~~

Result is this.

~~~
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
-e:1: [BUG] Segmentation fault at 0x000000000d011c
(snip)

[1]    57115 abort      ruby -ve "def x; Proc.new { return 1 }.tap(&:call); end; p x"
~~~

not working

* ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
* ruby 2.4.0dev (2016-06-06 trunk 55293) [x86_64-darwin15]

working

* ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin14.4.0]
* ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin15.5.0]
* ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin15.0]
* ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
* jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [darwin-x86_64]




---Files--------------------------------
bug-12462.log (5.77 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>