[#104169] [Ruby master Feature#17938] Keyword alternative for boolean positional arguments — matheusrichardt@...

Issue #17938 has been reported by matheusrich (Matheus Richard).

12 messages 2021/06/04

[#104213] [Ruby master Feature#17942] Add a `initialize(public @a, private @b)` shortcut syntax for defining public/private accessors for instance vars — tyler@...

Issue #17942 has been reported by TylerRick (Tyler Rick).

6 messages 2021/06/09

[#104288] [Ruby master Bug#17992] Upstreaming the htmlentities gem into CGI#.(un)escape_html — alexandermomchilov@...

Issue #17992 has been reported by AMomchilov (Alexander Momchilov).

9 messages 2021/06/15

[#104338] [Ruby master Misc#17997] DevelopersMeeting20210715Japan — mame@...

Issue #17997 has been reported by mame (Yusuke Endoh).

10 messages 2021/06/17

[#104361] [Ruby master Bug#18000] have_library doesn't work when ruby is compiled with --disable-shared --disable-install-static-library — jean.boussier@...

Issue #18000 has been reported by byroot (Jean Boussier).

9 messages 2021/06/18

[#104401] [Ruby master Feature#18007] Help developers of C extensions meet requirements in "doc/extension.rdoc" — mike.dalessio@...

Issue #18007 has been reported by mdalessio (Mike Dalessio).

16 messages 2021/06/25

[#104430] [Ruby master Bug#18011] `Method#parameters` is incorrect for forwarded arguments — josh.cheek@...

Issue #18011 has been reported by josh.cheek (Josh Cheek).

12 messages 2021/06/29

[ruby-core:104158] [Ruby master Bug#13298] mingw SEGV TestEnumerable#test_callcc

From: xtkoba+ruby@...
Date: 2021-06-04 01:37:16 UTC
List: ruby-core #104158
Issue #13298 has been updated by xtkoba (Tee KOBAYASHI).

File x64-mingw32-callcc-test.rb added

I have a similar problem with a recent 3.1.0dev version, in which the attached test case (named `x64-mingw32-callcc-test.rb`) dies silently.

I suppose that the code inserted by commit:a6ae274c3b06174401276fde2636f17720508532 (dated Jul 8 2007) interacts badly with `__builtin_setjmp` (and `__builtin_longjmp`) from x64-mingw32. The following change seems to make the test case work as expected.

```diff
--- a/cont.c
+++ b/cont.c
@@ -1388,6 +1388,9 @@
 
     /* restore machine stack */
 #ifdef _M_AMD64
+# if defined __MINGW32__ && !defined RUBY_JMP_BUF
+    if (0)
+# endif
     {
         /* workaround for x64 SEH */
         jmp_buf buf;
```

The expected result is as follows:

```
C:\CIFS\x64-mingw32>ruby ..\x64-mingw32-callcc-test.rb
C:/CIFS/x64-mingw32/lib/ruby/3.1.0/x64-mingw32/continuation.so: warning: callcc is obsolete; use Fiber instead
:foo
:bar

C:\CIFS\x64-mingw32>ruby -v
ruby 3.1.0dev (2021-06-02T15:07:44Z master 2a685da1fc) [x64-mingw32]
```


----------------------------------------
Bug #13298: mingw SEGV TestEnumerable#test_callcc
https://bugs.ruby-lang.org/issues/13298#change-92333

* Author: MSP-Greg (Greg L)
* Status: Assigned
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* ruby -v: ruby 2.5.0dev (2017-03-09 trunk 57821) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
First week in January, when I first started building, I had a SEGV in test-all occurring in TestEnumerable#test_callcc.  I patched around it, but decided it was time to see if I could find a solution.

The issue occurs in [test/ruby/test_enum.rb:559-570](https://github.com/ruby/ruby/blob/d6873af4bdc99914f20f6184966fa840c91bdf10/test/ruby/test_enum.rb#L559-L570).  Below is the code:

```ruby
assert_raise(RuntimeError) do
  c = nil
  o = Object.new
  class << o; self; end.class_eval do
    define_method(:<=>) do |x|
      callcc {|c2| c ||= c2 }
      0
    end
  end
  [o, o].sort_by {|x| x }
  c.call
end
```

While trying to determine the problem in a separate test environment, I stumbled across an odd solution.

Add the line `c.to_s` immediately before the `c.call` line.  My system no longer stops.

I'd be happy to do a PR, but I can only test on Windows.

Two questions --

1. Might all of tests that involve `callcc` or `Continuation` be moved into another test file?  Since it is considered 'obsolete'...  I'd be happy to do.

2. Rather odd that this fixes the issue.  Any ideas?

```diff
--- test/ruby/test_enum.rb.orig	Thu Mar 09 07:54:37 2017
+++ test/ruby/test_enum.rb	Thu Mar 09 11:39:07 2017
@@ -568,2 +568,3 @@
       [o, o].sort_by {|x| x }
+      c.to_s
       c.call

```

---Files--------------------------------
test_enum_559.txt (10.6 KB)
x64-mingw32-callcc-test.rb (434 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