[#121498] [Ruby Bug#21210] IO::Buffer gets invalidated on GC compaction — "hanazuki (Kasumi Hanazuki) via ruby-core" <ruby-core@...>

Issue #21210 has been reported by hanazuki (Kasumi Hanazuki).

10 messages 2025/04/01

[#121519] [Ruby Bug#21214] VmRSS consumption increase in Ruby 3.4.2 vs Ruby 3.3.6 — "mood_vuadensl (LOIC VUADENS) via ruby-core" <ruby-core@...>

Issue #21214 has been reported by mood_vuadensl (LOIC VUADENS).

9 messages 2025/04/02

[#121542] [Ruby Bug#21217] Integer.sqrt produces wrong results even on input <= 1e18 — "hjroh0315 (Matthew Roh) via ruby-core" <ruby-core@...>

Issue #21217 has been reported by hjroh0315 (Matthew Roh).

8 messages 2025/04/06

[#121551] [Ruby Feature#21219] `Object#inspect` accept a list of instance variables to display — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

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

10 messages 2025/04/07

[#121556] [Ruby Bug#21220] Memory corruption in update_line_coverage() [write at index -1] — "mbcodeandsound (Mike Bourgeous) via ruby-core" <ruby-core@...>

Issue #21220 has been reported by mbcodeandsound (Mike Bourgeous).

16 messages 2025/04/07

[#121560] [Ruby Feature#21221] Proposal to upstream ZJIT — "maximecb (Maxime Chevalier-Boisvert) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMjIxIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IG1heGltZWNiIChNYXhpbWUgQ2hldmFs

8 messages 2025/04/07

[#121565] [Ruby Feature#21254] Inlining Class#new — "tenderlovemaking (Aaron Patterson) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMjU0IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHRlbmRlcmxvdmVtYWtpbmcgKEFhcm9u

12 messages 2025/04/07

[#121601] [Ruby Feature#21258] Retire CGI library from Ruby 3.5 — "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>

Issue #21258 has been reported by hsbt (Hiroshi SHIBATA).

11 messages 2025/04/09

[#121621] [Ruby Feature#21262] Proposal: `Ractor::Port` — "ko1 (Koichi Sasada) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMjYyIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtvMSAoS29pY2hpIFNhc2FkYSkuDQoN

8 messages 2025/04/10

[#121627] [Ruby Feature#21264] Extract Date library from Ruby repo in the future — "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>

Issue #21264 has been reported by hsbt (Hiroshi SHIBATA).

8 messages 2025/04/11

[#121686] [Ruby Feature#21274] Show performance warnings for easily avoidable unnecessary implicit splat allocations — "jeremyevans0 (Jeremy Evans) via ruby-core" <ruby-core@...>

Issue #21274 has been reported by jeremyevans0 (Jeremy Evans).

6 messages 2025/04/18

[#121700] [Ruby Feature#21279] Bare "rescue" should not rescue NameError — "AMomchilov (Alexander Momchilov) via ruby-core" <ruby-core@...>

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

9 messages 2025/04/21

[#121702] [Ruby Bug#21280] StringIO#set_encoding warns when backed by chilled string literal — "jeremyevans0 (Jeremy Evans) via ruby-core" <ruby-core@...>

Issue #21280 has been reported by jeremyevans0 (Jeremy Evans).

13 messages 2025/04/22

[#121721] [Ruby Bug#21283] Some tests of TestMkmfConvertible is failing with VS2022 17.14.0 preview 4.0 — "hsbt (Hiroshi SHIBATA) via ruby-core" <ruby-core@...>

Issue #21283 has been reported by hsbt (Hiroshi SHIBATA).

8 messages 2025/04/24

[#121745] [Ruby Bug#21286] Windows - MSYS2 just updated to GCC 15.1.0, builds failing — "MSP-Greg (Greg L) via ruby-core" <ruby-core@...>

Issue #21286 has been reported by MSP-Greg (Greg L).

15 messages 2025/04/27

[#121755] [Ruby Misc#21290] Unable to build ruby extension on Fedora 42 due to possible GCC 15 issues — "lukef (Luke Freeman) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxMjkwIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGx1a2VmIChMdWtlIEZyZWVtYW4pLg0K

8 messages 2025/04/28

[ruby-core:121769] [Ruby Bug#21293] C23/GCC 15 build breakage with rb_define_method() and friends

From: "alanwu (Alan Wu) via ruby-core" <ruby-core@...>
Date: 2025-04-29 12:59:19 UTC
List: ruby-core #121769
Issue #21293 has been reported by alanwu (Alan Wu).

----------------------------------------
Bug #21293: C23/GCC 15 build breakage with rb_define_method() and friends
https://bugs.ruby-lang.org/issues/21293

* Author: alanwu (Alan Wu)
* Status: Open
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
GCC 15 defaults to `-std=gnu23`, which breaks rb_define_method() in some corner cases:

```diff
diff --git a/object.c b/object.c
index 5a379e9..958f421 100644
--- a/object.c
+++ b/object.c
@@ -4613,7 +4613,8 @@ InitVM_Object(void)
     rb_cFalseClass = rb_define_class("FalseClass", rb_cObject);
     rb_cFalseClass_to_s = rb_fstring_enc_lit("false", rb_usascii_encoding());
     rb_vm_register_global_object(rb_cFalseClass_to_s);
-    rb_define_method(rb_cFalseClass, "to_s", rb_false_to_s, 0);
+    int zero = 0;
+    rb_define_method(rb_cFalseClass, "to_s", rb_false_to_s, zero);
     rb_define_alias(rb_cFalseClass, "inspect", "to_s");
     rb_define_method(rb_cFalseClass, "&", false_and, 1);
     rb_define_method(rb_cFalseClass, "|", false_or, 1);
```

Applying the above is fine prior to C23, but on GCC 15 it triggers a build error:

```text
compiling object.c
In file included from ./include/ruby/ruby.h:27,
                 from constant.h:13,
                 from object.c:22:
object.c: In function 'InitVM_Object':
./include/ruby/internal/anyargs.h:288:135: error: passing argument 3 of 'rb_define_method_m3' from incompatible pointer type [-Wincompatible-pointer-types]
  288 | #define rb_define_method(klass, mid, func, arity)           RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
      |                                                                                                                                       ^~~~~~
      |                                                                                                                                       |
      |                                                                                                                                       VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}
object.c:4617:5: note: in expansion of macro 'rb_define_method'
 4617 |     rb_define_method(rb_cFalseClass, "to_s", rb_false_to_s, kek);
      |     ^~~~~~~~~~~~~~~~
./include/ruby/internal/anyargs.h:277:21: note: expected 'VALUE (*)(void)' {aka 'long unsigned int (*)(void)'} but argument is of type 'VALUE (*)(VALUE)' {aka 'long unsigned int (*)(long unsigned int)'}
  277 | RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
      |                     ^~~~~~~~~~~~~~~~
./include/ruby/internal/anyargs.h:252:41: note: in definition of macro 'RBIMPL_ANYARGS_DECL'
  252 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
      |                                         ^~~
object.c:1605:1: note: 'rb_false_to_s' declared here
 1605 | rb_false_to_s(VALUE obj)
      | ^~~~~~~~~~~~~
At top level:
cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-constant-logical-operand' may have been intended to silence earlier diagnostics
make: *** [Makefile:464: object.o] Error 1
```

This also happens for C method that takes a large number of arguments.


This because in C23 `void foo();` no longers means "foo takes an unspecified number of arguments" anymore, and there is no way to implement a working `ANYARGS` AFAIK.

Not something people would run into in practice, I hope.

(related: #21286 but this one is not Windows specific)



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/


In This Thread

Prev Next