ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "rubanthilak (Ruban Thilak) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "rubanthilak (Ruban Thilak)" <noreply@ruby-lang.org>
Subject: [ruby-core:116450] [Ruby master Bug#20212] Regex match method is crashing - (irb):6: [BUG] Segmentation fault at 0x0000000000000000 ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
Date: Thu, 25 Jan 2024 17:46:54 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-20212.20240125174653.52787@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-20212.20240125174653.52787@ruby-lang.org

Issue #20212 has been reported by rubanthilak (Ruban Thilak).

----------------------------------------
Bug #20212: Regex match method is crashing - (irb):6: [BUG] Segmentation fault at 0x0000000000000000 ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
https://bugs.ruby-lang.org/issues/20212

* Author: rubanthilak (Ruban Thilak)
* Status: Open
* Priority: Normal
* ruby -v: 3.3.0
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Tried this with ruby 3.3.0, both irb and rails console are crashing

```ruby
DOMAIN_REGEX = Regexp.new(
  /\A((?=.*?[a-z])(?!.*--)[a-z\d]+[a-z\d-]*[a-z\d]+).((?=.*?[a-z])(?!.*--)[a-z\d]+[a-z\d-]*[a-z\d]+).((?=.*?[a-z])(?!.*--)[a-zd]+[a-zd-]*[a-zd]+).((?=.*?[a-z])(?!.*--)[a-zd]+[a-zd-]*[a-zd]+)\Z/x
)
full_domain = "www.google.com"
100.times.each { full_domain.match(DOMAIN_REGEX) }
```





-- Ruby level backtrace information ----------------------------------------
/Users/rthilak/.rvm/gems/ruby-3.3.0@ams/bin/ruby_executable_hooks:22:in `<main>'
/Users/rthilak/.rvm/gems/ruby-3.3.0@ams/bin/ruby_executable_hooks:22:in `eval'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/bin/bundle:25:in `<main>'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/bin/bundle:25:in `load'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/exe/bundle:20:in `<top (required)>'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.5.3/exe/bundle:28:in `block in <top (required)>'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/cli.rb:28:in `start'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/cli.rb:34:in `dispatch'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/cli.rb:451:in `exec'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:23:in `run'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `kernel_load'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `load'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/bin/irb:25:in `<top (required)>'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/bin/irb:25:in `load'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `<top (required)>'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/irb.rb:903:in `start'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/irb.rb:1001:in `run'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/irb.rb:1001:in `catch'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/irb.rb:1002:in `block in run'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/irb.rb:1015:in `eval_input'
/Users/rthilak/.rvm/rubies/ruby-3.3.0/lib/ruby/3.3.0/irb.rb:1093:in `each_top_level_statement'
<internal:kernel>:187:in `loop'

---Files--------------------------------
trace.txt (61.7 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/postorius/lists/ruby-core.ml.ruby-lang.org/

       reply	other threads:[~2024-01-25 17:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 17:46 rubanthilak (Ruban Thilak) via ruby-core [this message]
2024-01-26  9:27 ` [ruby-core:116457] [Ruby master Bug#20212] Regex match method is crashing - (irb):6: [BUG] Segmentation fault at 0x0000000000000000 ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] hsbt (Hiroshi SHIBATA) via ruby-core
2024-01-29 12:22 ` [ruby-core:116475] " make_now_just (Hiroya Fujinami) via ruby-core
2024-03-20 23:18 ` [ruby-core:117270] " naruse (Yui NARUSE) via ruby-core

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-20212.20240125174653.52787@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    --cc=ruby-core@ml.ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).