From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 819C31F405 for ; Wed, 24 Jan 2024 08:42:11 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=wryH6jUa; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=GMZ1Jm9K; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 572A881EF7; Wed, 24 Jan 2024 08:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1706085723; bh=v1sIATdckIoUAclZVE4djulLuyzI1jWgahz1uYqvv5g=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=wryH6jUa8CVQLk5Bd+jITxLe1MLPBHROKaDToIH+TZGF6Kv9bncAM3S19CMODKe5a SNw6Fk/tkUfS6vlVHg2DOrjjwxDk7v3K5CDw7UbHFqBmFtgQXFyrtvfLyNa0EflMc0 komcjnxezVUD/hPpJfl0cFE5cCI3jS7nVdumapJc= Received: from wrqvtvvn.outbound-mail.sendgrid.net (wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 98F0481EEB for ; Wed, 24 Jan 2024 08:41:59 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=GMZ1Jm9K; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=uv6jGfqxbEH26tqR+tmkhykZB1BaLaiTGoiZG3T/HQg=; b=GMZ1Jm9KLxptGOaSPAk6/8qrWG34qFb06Va3GIlLQemdDqKschXfP2WBHUhXfOd4yIeS 097ZowFaHfdEsKzD2fGeWmZ9CRGt6RGIynLMWeZbwHMbSE5O+EBNmjLYlmz0pIHb+fDW8n 8XhhiFM6c2HfkUTHPH/e9So1w1YM/qtPQ1g7XR6EDZ0n88JdboIBfg/2LM0PfSJJZQgNc6 uqvhiQCM/bzV7uG8shWgHU1AfY3V2ysLRm1Zvx4lZOtaG7v+qK8IX+GTPJr6CECSNjQ+z2 5oE+zpn9/EP7de/OcN2erN1R1xs9do8lz39NjEgetQ4zWErAzTafbD28X0QiduOg== Received: by filterdrecv-58bfc74dd6-dgkl4 with SMTP id filterdrecv-58bfc74dd6-dgkl4-1-65B0CD56-12 2024-01-24 08:41:58.344315496 +0000 UTC m=+64470.911503823 Received: from herokuapp.com (unknown) by geopod-ismtpd-11 (SG) with ESMTP id 2whhLF3iQBGE5XTyQEBskg for ; Wed, 24 Jan 2024 08:41:58.278 +0000 (UTC) Date: Wed, 24 Jan 2024 08:41:58 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20207 X-Redmine-Issue-Author: Sundeep X-Redmine-Sender: Sundeep X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 92952 X-SG-EID: =?us-ascii?Q?TefgztZ6cgP9HMCexuH0G4f1HoRH73gjqaf1hTlp6UMOA4kJ1ljo8=2Ferdcdyzj?= =?us-ascii?Q?14NyVFE0dxHxs35y+rQTjHb0+LUkH3KQNmUvqK4?= =?us-ascii?Q?sjXfVZAKlp6ky80KTs0fiPxP1kyYlNQPZArk5uY?= =?us-ascii?Q?k3CJfG6tEgdGPD9zAtcyS+IFYITA+Ps=2FcVtr9sw?= =?us-ascii?Q?WDvcX6lbWxTSrG9VHGf8PLuzqvSsVnuzMwS5qdl?= =?us-ascii?Q?g6NMA9kQfR3=2FcW04jNiuY=2F+bMKqsElmzeXXxJB=2F?= =?us-ascii?Q?YS9w6pqhepfGSXBuJMf7Q=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== Message-ID-Hash: OQ6PMASDVAZJZI5NYOWZDCEZ66QGJWRM X-Message-ID-Hash: OQ6PMASDVAZJZI5NYOWZDCEZ66QGJWRM X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:116395] [Ruby master Bug#20207] Segmentation fault for a regexp containing positive and negative lookaheads List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Sundeep (Sundeep Agarwal) via ruby-core" Cc: "Sundeep (Sundeep Agarwal)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20207 has been reported by Sundeep (Sundeep Agarwal). ---------------------------------------- Bug #20207: Segmentation fault for a regexp containing positive and negative lookaheads https://bugs.ruby-lang.org/issues/20207 * Author: Sundeep (Sundeep Agarwal) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I'm getting segmentation fault for the following regexp with Ruby 3.3.0: ``` ruby puts 'clan'.match?(/(?=.*a)(?!.*n)/) ``` This is the minimal example for which I was able to produce the issue. `a` and `n` in the above example are just a sample, can be other character combinations too. There has to be at least two characters before them in the input string (`cl` in the above example). The error is seen when the above code is run from a file, but only occasionally from irb. When run from a file, most of the time I get segmentation fault (see attached log file), but sometimes I get the following error: ``` ruby lookaround.rb:1:in `match?': undefined bytecode (bug): /(?=.*a)(?!.*n)/ (RegexpError) from lookaround.rb:1:in `
' ``` When asked in the r/ruby forum, somebody else was able to reproduce this issue. They also mentioned that the issue wasn't seen in the Ruby 3.2.2 version. ---Files-------------------------------- lookaround_segfault.log (15.9 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/