* [ruby-core:120432] [Ruby master Bug#20989] Segmentation fault in Ripper when lexing `/#{"\xcd"}/`
@ 2024-12-27 18:39 Earlopain (Earlopain _) via ruby-core
2024-12-28 4:11 ` [ruby-core:120436] " nobu (Nobuyoshi Nakada) via ruby-core
0 siblings, 1 reply; 2+ messages in thread
From: Earlopain (Earlopain _) via ruby-core @ 2024-12-27 18:39 UTC (permalink / raw)
To: ruby-core; +Cc: Earlopain (Earlopain _)
Issue #20989 has been reported by Earlopain (Earlopain _).
----------------------------------------
Bug #20989: Segmentation fault in Ripper when lexing `/#{"\xcd"}/`
https://bugs.ruby-lang.org/issues/20989
* Author: Earlopain (Earlopain _)
* Status: Open
* ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
When I paste this code snippet into irb, I get a segfault: `/#{"\xcd"}/`. Current master (https://github.com/ruby/ruby/commit/adbbc9109ee71848204b5168a7c1bf604849e5fa) also fails.
Here is a simple reproduction, I attached the full bug as an attachment:
```rb
require "ripper"
lexer = Ripper::Lexer.new('/#{"\xcd"}/', '-', 0)
lexer.scan.each
# => /home/earlopain/.rbenv/versions/3.4.1/lib/ruby/3.4.0/ripper/lexer.rb:177: [BUG] Segmentation fault at 0x0000000000000008
# => ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux]
```
---Files--------------------------------
bug.txt (27.2 KB)
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:120436] [Ruby master Bug#20989] Segmentation fault in Ripper when lexing `/#{"\xcd"}/`
2024-12-27 18:39 [ruby-core:120432] [Ruby master Bug#20989] Segmentation fault in Ripper when lexing `/#{"\xcd"}/` Earlopain (Earlopain _) via ruby-core
@ 2024-12-28 4:11 ` nobu (Nobuyoshi Nakada) via ruby-core
0 siblings, 0 replies; 2+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2024-12-28 4:11 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #20989 has been updated by nobu (Nobuyoshi Nakada).
Backport changed from 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED
commit:0ccc765 may be needed to backport to all versions.
----------------------------------------
Bug #20989: Segmentation fault in Ripper when lexing `/#{"\xcd"}/`
https://bugs.ruby-lang.org/issues/20989#change-111213
* Author: Earlopain (Earlopain _)
* Status: Closed
* ruby -v: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: REQUIRED
----------------------------------------
When I paste this code snippet into irb, I get a segfault: `/#{"\xcd"}/`. Current master (https://github.com/ruby/ruby/commit/adbbc9109ee71848204b5168a7c1bf604849e5fa) also fails.
Here is a simple reproduction, I attached the full bug as an attachment:
```rb
require "ripper"
lexer = Ripper::Lexer.new('/#{"\xcd"}/', '-', 0)
lexer.scan.each
# => /home/earlopain/.rbenv/versions/3.4.1/lib/ruby/3.4.0/ripper/lexer.rb:177: [BUG] Segmentation fault at 0x0000000000000008
# => ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux]
```
---Files--------------------------------
bug.txt (27.2 KB)
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-28 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-27 18:39 [ruby-core:120432] [Ruby master Bug#20989] Segmentation fault in Ripper when lexing `/#{"\xcd"}/` Earlopain (Earlopain _) via ruby-core
2024-12-28 4:11 ` [ruby-core:120436] " nobu (Nobuyoshi Nakada) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).