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)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5937C1F4CC for ; Wed, 15 Jan 2025 01:47:11 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=2BVrtufk; 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=jgzQbX+A; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1736905628; bh=Zu0KXPEgEokrXk9fpkoo4I05qVR0vQSVgDde719qY/E=; 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=2BVrtufk9ZsMKNRL8r6GAcbWOY1spbgJsOtYcdGZQdS1cvKUnYga72JfACCnnTJhP M0EARogkrh6uz4qtw7ux7QFFSsH/NEZ2RdBN7WJUnd7dJ2Uz0R/tpBxv/Ji1kwCbGY ksruW8RLmIJVmC4pSv5RVVvvSDTmIcyxxvT6L4rA= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id D920A46BC3 for ; Wed, 15 Jan 2025 01:47:08 +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=jgzQbX+A; dkim-atps=neutral Received: from s.wfbtzhsw.outbound-mail.sendgrid.net (s.wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 751B746B37 for ; Wed, 15 Jan 2025 01:46:41 +0000 (UTC) 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=lVkuy1AJjBVUDw2v8JZL4vw4Zor4oKKhgGSI3gMSsWo=; b=jgzQbX+A37EHaAMDsUPeGRTmRG4QhCl8Z/GDZeADXwzauJER5op5j0LzEADXqInP6HuI gGqrjerlkX3tnuRD3oMxDz1jRd368TSh9x3DUWntA88Vp2hsNsCz7UQNgcAzsRmgynFe8j sz90fVC+LXNiYKpQBCNapIJLaz7uI/nqsgnb1GvE0rLAimG9xDwakco7U7ewzm+usxCYGR HKLy7yKn46OWWugvsVVUpjbsrMokJw2cxJXyV0kRa/u4sYcMTMIkf5gYD/cc8N+eqwsX7Q ZMAgIZQraKzf/qjQ2GGqJwSvf+4Hq033XeSaE4htPvgE5LC7RbBm3qRJ6HRdYIiw== Received: by recvd-5f9ffdf494-zx4m2 with SMTP id recvd-5f9ffdf494-zx4m2-1-67871380-E 2025-01-15 01:46:40.493680209 +0000 UTC m=+5286561.529665447 Received: from herokuapp.com (unknown) by geopod-ismtpd-8 (SG) with ESMTP id LXcdZYuiR6W1iNp-19fBzw for ; Wed, 15 Jan 2025 01:46:40.451 +0000 (UTC) Date: Wed, 15 Jan 2025 01:46:40 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20892 X-Redmine-Issue-Author: byroot X-Redmine-Issue-Priority: Normal X-Redmine-Sender: k0kubun 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: 97366 X-SG-EID: =?us-ascii?Q?u001=2EsWSpkbcla4bB6tSlkOwdN01=2FLLwMflJlYDs0Ak3Gg6dwg4YUERnU2ZQsI?= =?us-ascii?Q?KPesnHmuO3R4nEnLV41FQje7rMJs=2FlByQKQxPtJ?= =?us-ascii?Q?4AIt7Pq58gBpp2CkYZsjGe2zg6Pc5fpVbaMwAPX?= =?us-ascii?Q?DMuF0sEIxOoKqZv6LR79Q653F5u8ibsh3Q5K1=2Fj?= =?us-ascii?Q?ABOCy4vxyRqboqVzyIjAqQtmYp+OyXgtlvUZBSc?= =?us-ascii?Q?Kn8oFdxV2Xin8bB55UFC0rJS8gyEHEFMhxpvHj9?= =?us-ascii?Q?GXfAyGMZreZaXwdVpA2iSvVRCw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 6OPOGKVKR7CFQKSQAZZKILYOLDMRYKC6 X-Message-ID-Hash: 6OPOGKVKR7CFQKSQAZZKILYOLDMRYKC6 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.9 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:120680] [Ruby master Bug#20892] `ObjectSpace.dump` can produce broken JSON for classes with temporary names List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "k0kubun (Takashi Kokubun) via ruby-core" Cc: "k0kubun (Takashi Kokubun)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20892 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE `ruby_3_3` merged https://github.com/ruby/ruby/pull/12068. Thank you! ---------------------------------------- Bug #20892: `ObjectSpace.dump` can produce broken JSON for classes with temporary names https://bugs.ruby-lang.org/issues/20892#change-111503 * Author: byroot (Jean Boussier) * Status: Closed * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE ---------------------------------------- ```ruby puts ObjectSpace.dump(Class.new.tap { |c| c.set_temporary_name('" little boby table') }) ``` Produces the following JSON: ```json { "address":"0x120bea980", "type":"CLASS", "shape_id":2, "slot_size":160, "class":"0x120bea840", "variation_count":0, "superclass":"0x1041ffd38", "name":"" little boby table", "references":["0x1041ffd38", "0x123e71a98"], "memsize":192, "flags":{"wb_protected":true} } ``` Notice how the `name` property is broken. This only impacts 3.3.x, as that's when `set_temporary_name` was introduced, before that, it was impossible to assign a name that would cause such bug. -- 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/