[#80531] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...>

SASADA Koichi <ko1@ruby-lang.org> wrote:

24 messages 2017/04/02
[#80532] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/04/02

On 2017/04/02 11:35, Eric Wong wrote:

[#80540] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/04/03

SASADA Koichi <ko1@atdot.net> wrote:

[#81027] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

Eric Wong <normalperson@yhbt.net> wrote:

[#81028] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 9:33, Eric Wong wrote:

[#81029] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 10:53, SASADA Koichi wrote:

[#81031] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <ko1@atdot.net> wrote:

[#81033] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/08

On 2017/05/08 12:01, Eric Wong wrote:

[#81035] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/08

SASADA Koichi <ko1@atdot.net> wrote:

[#81042] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/08 15:36, Eric Wong wrote:

[#81044] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <ko1@atdot.net> wrote:

[#81045] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — SASADA Koichi <ko1@...> 2017/05/09

On 2017/05/09 12:38, Eric Wong wrote:

[#81047] Re: [ruby-cvs:65407] normal:r58236 (trunk): thread.c: comments on M:N threading [ci skip] — Eric Wong <normalperson@...> 2017/05/09

SASADA Koichi <ko1@atdot.net> wrote:

[ruby-core:80704] [Ruby trunk Bug#13412] Infinite recursion with define_method may cause silent SEGV or cfp consistency error

From: s.wanabe@...
Date: 2017-04-16 03:16:14 UTC
List: ruby-core #80704
Issue #13412 has been updated by wanabe (_ wanabe).

File bug.rb added
File bug.sh added
File bug13412.r58331.patch added
File bug13412.r58367.patch added
File bug_stat.sh added

I have checked the patterns with attached .patch and .sh and .rb.

This is the result at r58331.

```
ruby 2.5.0dev (2017-04-13 trunk 58331) [x86_64-linux]
73 bug.*.cfp.noprev.BUG.txt
     73 #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
35 bug.*.cfp.prev.BUG.txt
     35 #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
44 bug.*.nocfp.noprev.silent.txt
     20 #0  hook_before_rewind at ../../vm.c:1641
     10 #0  vm_exec at ../../vm.c:1764
      6 #0  VM_ENV_FLAGS at ../../vm_core.h:1019
      5 #0  VM_ENV_FLAGS (ep=0x0, flag=0) at ../../vm_core.h:1019
      3 #0  VM_FRAME_TYPE at ../../vm_core.h:1027
```

And this is the result at r58367.

```
ruby 2.5.0dev (2017-04-16 trunk 58367) [x86_64-linux]
83 bug.*.cfp.noprev.BUG.txt
     83 #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
797 bug.*.cfp.prev.BUG.txt
    797 #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
```

It seems like silent SEGVs are eliminated.
Thank you Nobu for your works. (r58353, r58354, r58363 and maybe r58328, r58334, r58352 and/or r58361?)

----------------------------------------
Bug #13412: Infinite recursion with define_method may cause silent SEGV or cfp consistency error
https://bugs.ruby-lang.org/issues/13412#change-64250

* Author: wanabe (_ wanabe)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-04-09 trunk 58286) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
The script causes silent (no output [BUG]) SEGV or "cfp consistency error" on my environment.

```ruby
define_method(:foo) { foo }

loop do
  1.times do
    1.times do
      begin
        foo
      rescue Exception
        nil
      end
    end
  end
end
```

I think this is related to #11430 (maybe same).

---Files--------------------------------
stderr.log (6.96 KB)
bug.rb (123 Bytes)
bug.sh (775 Bytes)
bug13412.r58331.patch (689 Bytes)
bug13412.r58367.patch (711 Bytes)
bug_stat.sh (296 Bytes)


-- 
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>

In This Thread

Prev Next