[#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:80777] [Ruby trunk Bug#13390] MinGW build test-all SEGV, issue in test framework or error recovery?

From: Greg.mpls@...
Date: 2017-04-18 20:41:02 UTC
List: ruby-core #80777
Issue #13390 has been updated by MSP-Greg (Greg L).


This patch is no longer needed as of builds around `ruby 2.5.0dev (2017-04-17 trunk 58383) [x64-mingw32]`.  It may return when I get around to building 2.4 and 2.3 stable branches.  Please close.

----------------------------------------
Bug #13390: MinGW build test-all SEGV, issue in test framework or error recovery?
https://bugs.ruby-lang.org/issues/13390#change-64367

* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-03-31 trunk 58222) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Today, while building trunk (64 bit MinGW), I had a 'no output' SEGV during test-all.

I think I've had this before, but I don't recall how recently, 32 or 64, etc.

The problem is in the following test:

File ['test/ruby/test_keyword.rb', line 310](https://github.com/ruby/ruby/blob/trunk/test/ruby/test_keyword.rb#L310-L333)

```ruby
310   def test_required_keyword
311     feature7701 = '[ruby-core:51454] [Feature #7701] required keyword argument'
312     o = Object.new
313     assert_nothing_raised(SyntaxError, feature7701) do
314       eval("def o.foo(a:) a; end", nil, "xyzzy")
315       eval("def o.bar(a:,**b) [a, b]; end")
316     end
317     assert_raise_with_message(ArgumentError, /missing keyword/, feature7701) {o.foo}
318     assert_raise_with_message(ArgumentError, /unknown keyword/, feature7701) {o.foo(a:0, b:1)}
319     begin
320       o.foo(a: 0, b: 1)
321     rescue => e
322       assert_equal('xyzzy', e.backtrace_locations[0].path)
323     end
324     assert_equal(42, o.foo(a: 42), feature7701)
325     assert_equal([[:keyreq, :a]], o.method(:foo).parameters, feature7701)
326   
327     bug8139 = '[ruby-core:53608] [Bug #8139] required keyword argument with rest hash'
328     assert_equal([42, {}], o.bar(a: 42), feature7701)
329     assert_equal([42, {c: feature7701}], o.bar(a: 42, c: feature7701), feature7701)
330     assert_equal([[:keyreq, :a], [:keyrest, :b]], o.method(:bar).parameters, feature7701)
331     assert_raise_with_message(ArgumentError, /missing keyword/, bug8139) {o.bar(c: bug8139)}
332     assert_raise_with_message(ArgumentError, /missing keyword/, bug8139) {o.bar}
333   end
```

Now, the part where it gets fun is that I originally thought the error was between lines 319-323.  I moved out of the build framework, simplified it, and things seemed okay.  All errors were raised, backtraces were correct, etc.

As I tested further, here's what I found:

1. If lines 317 & 318 are commented out, the 319-323 block runs as it should, or line 322 is 'correct'.

2. If lines 317 & 318 are **not** commented out, line 320 must be commented out for the method to finish.

3. Otherwise, a 'no output' SEGV...



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