[#122643] [Ruby Bug#21498] Windows - Ruby Overrides C Library APIs thus breaking them — "cfis (Charlie Savage) via ruby-core" <ruby-core@...>

Issue #21498 has been reported by cfis (Charlie Savage).

9 messages 2025/07/02

[#122658] [Ruby Feature#21501] Include native filenames in backtraces as sources for native methods — "ivoanjo (Ivo Anjo) via ruby-core" <ruby-core@...>

Issue #21501 has been reported by ivoanjo (Ivo Anjo).

10 messages 2025/07/05

[#122665] [Ruby Bug#21503] \p{Word} does not match on \p{Join_Control} while docs say it does — "procmarco (Marco Concetto Rudilosso) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTAzIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHByb2NtYXJjbyAoTWFyY28gQ29uY2V0

8 messages 2025/07/07

[#122734] [Ruby Bug#21511] Use-after-free of the execution context after the fiber object carrying it is freed in GC — "tuonigou (tianyang sun) via ruby-core" <ruby-core@...>

Issue #21511 has been reported by tuonigou (tianyang sun).

10 messages 2025/07/14

[#122797] [Ruby Feature#21515] Add `&return` as sugar for `x=my_calculation; return x if x` — "nhorton (Noah Horton) via ruby-core" <ruby-core@...>

Issue #21515 has been reported by nhorton (Noah Horton).

13 messages 2025/07/16

[#122842] [Ruby Feature#21518] Statistical helpers to `Enumerable` — "Amitleshed (Amit Leshed) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTE4IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IEFtaXRsZXNoZWQgKEFtaXQgTGVzaGVk

12 messages 2025/07/23

[#122847] [Ruby Feature#21520] Feature Proposal: Enumerator::Lazy#peek — "nuzair46 (Nuzair Rasheed) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTIwIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IG51emFpcjQ2IChOdXphaXIgUmFzaGVl

12 messages 2025/07/24

[ruby-core:122800] [Ruby Bug#21460] Pattern matching crash: unexpected PM_CALL_NODE

From: "st0012 (Stan Lo) via ruby-core" <ruby-core@...>
Date: 2025-07-16 18:22:41 UTC
List: ruby-core #122800
Issue #21460 has been updated by st0012 (Stan Lo).

Status changed from Open to Closed

Fixed in changeset [git|2591b935930aaeee652df3ffbbe1cb138e7f5346](https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/2591b935930aaeee652df3ffbbe1cb138e7f5346).

----------------------------------------
Bug #21460: Pattern matching crash: unexpected PM_CALL_NODE
https://bugs.ruby-lang.org/issues/21460#change-114080

* Author: bendrissou (Bachir Bendrissou)
* Status: Closed
* Assignee: prism
* ruby -v: ruby 3.5.0dev (2025-06-11 commit 970813d982) +PRISM
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
Hi,

Pattern matching crashes when using an arithmetic expression like `-1**2` in a hash pattern. Ruby attempts to process the expression as a PM_CALL_NODE, which results in a compiler crash rather than a syntax or match error.

### Input
```
foo => -1**2
```

### Output
```
input.rb: [BUG] Unexpected node type in pattern matching expression: PM_CALL_NODE
ruby 3.5.0dev (2025-06-11T18:07:43Z master 970813d982) +PRISM [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:000720 DUMMY  [FINISH]


-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1

-- C level backtrace information -------------------------------------------
/lib/x86_64-linux-gnu/libasan.so.5(__interceptor_backtrace+0x40) [0x7f0716ea0d40] ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4022
/home/program/build/ruby(rb_print_backtrace+0x11) [0x55d00b05dda9] ../vm_dump.c:843
/home/program/build/ruby(rb_vm_bugreport) ../vm_dump.c:1175
/home/program/build/ruby(rb_bug_without_die_internal+0xc5) [0x55d00a720b21] ../error.c:1097
/home/program/build/ruby(rb_bug) ../error.c:1115
/home/program/build/ruby(pm_compile_pattern+0x3e76) [0x55d00aee1b46] ../prism_compile.c:3171
/home/program/build/ruby(ADD_ELEM+0x0) [0x55d00aeb2793] ../prism_compile.c:8125
/home/program/build/ruby(pm_compile_match_required_node) ../prism_compile.c:8130
/home/program/build/ruby(pm_compile_node) ../prism_compile.c:9847
/home/program/build/ruby(pm_compile_node+0x529d) [0x55d00aea7bdd] ../prism_compile.c:10330
/home/program/build/ruby(pm_compile_scope_node+0x3f42) [0x55d00aeff382] ../prism_compile.c:7012
/home/program/build/ruby(pm_compile_node+0x1b50) [0x55d00aea4490] ../prism_compile.c:10201
/home/program/build/ruby(APPEND_LIST+0x0) [0x55d00af062a4] ../prism_compile.c:10502
/home/program/build/ruby(pm_iseq_compile_node) ../prism_compile.c:10506
/home/program/build/ruby(pm_iseq_new_with_opt_try+0x3e) [0x55d00a840c5e] ../iseq.c:1050
/home/program/build/ruby(rb_protect+0x30f) [0x55d00a7343ff] ../eval.c:1059
/home/program/build/ruby(pm_iseq_new_with_opt+0x482) [0x55d00a84ec12] ../iseq.c:1103
/home/program/build/ruby(pm_iseq_new_main+0xbc) [0x55d00a84f2ac] ../iseq.c:951
/home/program/build/ruby(process_options+0x2d32) [0x55d00a9eeb12] ../ruby.c:2641
/home/program/build/ruby(ruby_process_options+0x3f0) [0x55d00a9f1290] ../ruby.c:3199
/home/program/build/ruby(ruby_options+0x2a7) [0x55d00a731407] ../eval.c:117
/home/program/build/ruby(rb_main+0x19) [0x55d00a7227ff] ../main.c:42
/home/program/build/ruby(main) ../main.c:62
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f07169ec083]
/home/program/build/ruby(_start) [0x55d00a723dce]

-- Other runtime information -----------------------------------------------

* Loaded script: input.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb
    6 set.rb

Aborted
```

### Environment

Ruby version: ruby 3.5.0dev (2025-06-11 commit 970813d982) +PRISM

Platform: x86_64-linux

Built from source

Parser backend: Prism (default)



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