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 autolearn=ham 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) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 7F27B1F44D for ; Wed, 24 Apr 2024 22:16:23 +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=F4jJpOe6; 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=Kkbenzk1; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 0377D8446B; Wed, 24 Apr 2024 22:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1713996974; bh=WIsDVybWQNUS4P0CeELveqfKydMd558zDHFOR/pKYHo=; 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=F4jJpOe6XU69oPkwShW8hZC/Gpt6vGqrH4MW1dmWN+MrLg6yMpOvQ9juOZOD6UaiC 0+3MYmxoOpLFuu6PdVb+VMZ2rCo1gOlEsQHhwKtddpXQaebnkHefD/FlZLGyqqQdtk eMJHsd7vxndAed4euXgl8EUrxEuMJ7hNiqXDjV/M= Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 6CF9F84452 for ; Wed, 24 Apr 2024 22:16:09 +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=Kkbenzk1; 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=QXAyh//ymkTE+1nHVj/DLnYj69bOqF32Yz70/+vtceU=; b=Kkbenzk1f1tzoO84BYyHFzX7nuIbDAbL/NZ1fY6qetPNE+Hzc3zjfeq09yrejsbDj3qJ lnpfDyc3scv0Ko538a7RTf3amEEvDnrlORFd+ddskxLABqTIrIE5oE2Qm5TLJaAS1XGILs KVxm606QUlya1YOe0d9NVdyku8AlVEroXrUHmE7j1jFWKycyi4ALmltAsoMtT+gsJ8rvVS yeBcQ4WW+hbW3u+nFr8u/C10xDD3FdmRrecMhh5eGy7U89/kMH93k++k/3qVMH8tXZGNiv EZPAFdSV7stl3Bk3bqe9dH+Z94k0x54iiyjbaQRxofp9zYe3Ib1DMpld5KDG/FZg== Received: by filterdrecv-54566fd897-glgb7 with SMTP id filterdrecv-54566fd897-glgb7-1-662984A8-E 2024-04-24 22:16:08.390384197 +0000 UTC m=+1038488.431269231 Received: from herokuapp.com (unknown) by geopod-ismtpd-35 (SG) with ESMTP id L-A-boaJTq2C4a6C0oJseA for ; Wed, 24 Apr 2024 22:16:08.335 +0000 (UTC) Date: Wed, 24 Apr 2024 22:16:08 +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: hsbt 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: 94288 X-SG-EID: =?us-ascii?Q?u001=2ESNtsfy=2FRYrUmxOeGSN+Ah1new64UppKFg8YOAgra6KK6sIhqEP6LswYh4?= =?us-ascii?Q?tCf2AhAD20FCmXanLCSpdJ9Heq83FKB1eeA=2FIRz?= =?us-ascii?Q?=2FUFVHcMb3GMqufCyhB1AziQPIJL=2FJkYWQt1YUrK?= =?us-ascii?Q?kLGeGeJIm=2FTCrUO9mO0Ub9ls5WXIrtpWwbb1SbE?= =?us-ascii?Q?nUeAX62LQFKT53ah4NC=2FyLFssDD8xpC=2F98o+H2z?= =?us-ascii?Q?5bt2wenQcnR22wmBw9nY5l0s5aaVQ0M2ImE=2FYvI?= =?us-ascii?Q?Tb2aQzEt9f6kOqkxKevf09aVvw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: TTOLYZOCQHYIJ7HTWDPUWOJ6TK7GO2C5 X-Message-ID-Hash: TTOLYZOCQHYIJ7HTWDPUWOJ6TK7GO2C5 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:117692] [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: "hsbt (Hiroshi SHIBATA) via ruby-core" Cc: "hsbt (Hiroshi SHIBATA)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20452 has been updated by hsbt (Hiroshi SHIBATA). Tags set to musl, alpine Status changed from Open to Feedback Unfortunately, there is no active maintainer for musl or alpine platform. I tagged them to [musl](https://bugs.ruby-lang.org/projects/ruby-master/issues?fields%5B%5D=issue_tags&operators%5Bissue_tags%5D=%3D&set_filter=1&values%5Bissue_tags%5D%5B%5D=musl). We welcome patch for them. ---------------------------------------- Bug #20452: Ruby 3.3 on Alpine Linux results in a relatively shallow SystemStackError exception https://bugs.ruby-lang.org/issues/20452#change-108101 * 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/