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=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 836521F44D for ; Thu, 25 Apr 2024 12:06:04 +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=YzkjA4Cg; 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=I+k6NR2t; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id A96DB844DD; Thu, 25 Apr 2024 12:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1714046755; bh=k/ty12DenIZWv7smgovK7TR1g3/dfs1lgiTPswVXB3Q=; 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=YzkjA4CgN9+7JhvQCEggpGfTJhIAaPQdeQA7+Q+7uYRDnWETFwZWS2rHnO4AmO1s0 ksj9rzg6EhAD9weRnldQ4fe6d5MlClVpr0fz1jHkQ6pGVW5BmiDZCIdNfelnvuxNEm gZ+8EkI5C2H7jZxLUxWrGHYIlF/dne9isSyy1HCI= Received: from s.wrqvtvvn.outbound-mail.sendgrid.net (s.wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 0006781386 for ; Thu, 25 Apr 2024 12:05:52 +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=I+k6NR2t; 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=eyfFRb3iDRR/KNNsnUoJ2fmxywW3YqBnB0aY6ieyq+U=; b=I+k6NR2tumvSRc8SNDyPe80rDjoKa/Mc1XXoDybIbki86qAJHV8et7SsctLhOsh1OGLb Ld1v/VpCFG1K3a+BULJkgGtT4ZyvoDGU6i2LGg5FThNZIMGPA2YnNljadbL2oiw7CaajLM +T1IybTp4xwetwabw54HpfRs7saPuhNO01ibiYALfOdL9h/y3YoFGCqZbkjb6LIcZ9JjL3 3Ndj/szBO7IvOZTo1KmshkKU2fs0u3Jm+w8PQh0FybvmH6pG9nFfUhm3kfZLFKFEfQOeP3 693OnyATqhavjtC/71DkML/gdL+AgmjzceqbraQLJ9W14RK575/0mT7NUh7WNY2w== Received: by filterdrecv-854b845bd5-d477k with SMTP id filterdrecv-854b845bd5-d477k-1-662A471F-19 2024-04-25 12:05:51.755735561 +0000 UTC m=+1088183.553999912 Received: from herokuapp.com (unknown) by geopod-ismtpd-10 (SG) with ESMTP id e8Uz55qbQu-lI2G1d-g8Mg for ; Thu, 25 Apr 2024 12:05:51.750 +0000 (UTC) Date: Thu, 25 Apr 2024 12:05:51 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20452 X-Redmine-Issue-Author: Earlopain X-Redmine-Issue-Priority: Normal X-Redmine-Sender: nobu 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: 94299 X-SG-EID: =?us-ascii?Q?u001=2E5PtzXJ23KrYzgM1nrOIr+EQ222PyrDaWSg0Er8CZ8tP86xyXmBM81zBKD?= =?us-ascii?Q?HreavdFYMbHjxXOR6UPMkt=2Fu9CyBIp6y52n8D2y?= =?us-ascii?Q?qA9zqurrgUc4TBdS4+I20H6JEJaDxBpRoIY23HS?= =?us-ascii?Q?15kzIRiRTZGRVHFk4sf2Vk26LWxtppkiF6NwCCo?= =?us-ascii?Q?pcXnmuZk8UWsgDe20GMwyK0OId18O7SM7LjRXUm?= =?us-ascii?Q?Vhxg9KFnPs6ojK0+do9eYT=2FFQW7OG7lmR=2FI9CEi?= =?us-ascii?Q?Yie5YrvRpmaG8GQaCp5fo1tgaA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: GLFMS7QWTQUGJJFI3E2Y6PDLK4X5EHLG X-Message-ID-Hash: GLFMS7QWTQUGJJFI3E2Y6PDLK4X5EHLG 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:117703] [Ruby master Bug#20452] Ruby 3.3 on Alpine Linux results in a relatively shallow SystemStackError exception List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "nobu (Nobuyoshi Nakada) via ruby-core" Cc: "nobu (Nobuyoshi Nakada)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20452 has been updated by nobu (Nobuyoshi Nakada). Does this help you? https://github.com/nobu/ruby/tree/mainstackaddr ---------------------------------------- Bug #20452: Ruby 3.3 on Alpine Linux results in a relatively shallow SystemStackError exception https://bugs.ruby-lang.org/issues/20452#change-108113 * Author: Earlopain (A S) * Status: Feedback * ruby -v: 3.3.1 * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- This is a redo of https://bugs.ruby-lang.org/issues/14387, reported against a non-eol version. The same issue still applies on recent rubies, though I personally only have tested 3.3 and 3.2: ```rb n = 100000 res = {} 1.upto(n).to_a.inject(res) do |r, i| r[i] = {} end def f(x) x.each_value { |v| f(v) } end f(res) ``` The patch from https://bugs.ruby-lang.org/issues/14387#note-13 still works, though as per https://bugs.ruby-lang.org/issues/14387#note-16 it can't be accepted as is. With the patch applied: ``` (irb):8:in `block in f': stack level too deep (SystemStackError) from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' ... 11549 levels... from /usr/local/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `' from /usr/local/bin/irb:25:in `load' from /usr/local/bin/irb:25:in `
' ``` Without the patch: ``` (irb):8:in `each_value': stack level too deep (SystemStackError) from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' from (irb):8:in `each_value' from (irb):8:in `f' from (irb):8:in `block in f' ... 286 levels... from /usr/local/lib/ruby/gems/3.3.0/gems/irb-1.11.0/exe/irb:9:in `' from /usr/local/bin/irb:25:in `load' from /usr/local/bin/irb:25:in `
' ``` To reproduce, I have removed lines 102-105 from https://github.com/docker-library/ruby/blob/f5753434bb23041dd9913bb7b650e7be735e03c0/3.3/alpine3.19/Dockerfile. Check out the previous ticket for more information, there are a few conversations about possible solutions. -- 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/