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 EECB11F4C1 for ; Tue, 12 Nov 2024 18:47:50 +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=IfjlyX2B; 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=T8fW7X2N; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1731437268; bh=vqiLU5Fi+JpxPDu56XVUUybuPYv/7WEex1LfgoQBXK4=; 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=IfjlyX2BFEIiY/VbLesV7eYd3vFrX4pjFObuKopSwc6dOh7pvfAfBQfSsIggIYzYD Wm+OOUIkMsZSvNFGP50vns/fAS3ByBcSymIOxJqrCEyqYbE7k+qEBTw8S1Dcrqmih8 3fbLgTF1AVL0PpJzHadj+mYIZgp8roudCktJ+8T8= Received: from nue.mailmanlists.eu (localhost [IPv6:::1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 926A644BB6 for ; Tue, 12 Nov 2024 18:47:48 +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=T8fW7X2N; 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 2555E44B27 for ; Tue, 12 Nov 2024 18:47:37 +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=5fQe0FD2bc6Cg9SjzWLOp/sdH1at6rqmhO5CMEqjwwU=; b=T8fW7X2N+V2sFxLrvtJ63sRMI04tn0hBth69dzQnAe+W3sN87XhiEG/2A2+41/6m/VzE Nk2AU8B6bmaG4qU8VmoSM00u7+sCKGSF4PcAJjXfe0MCwhIolDieIOhZugvD0yWLbvikQI uxVUNiL6G9X8RF+SjCEVHMLibZXRfOvjD/usOZW/rZ6SFJIoUN3FhhIkWHBlVH16cB56f1 ZnXDzb0qLBILkjT875wVhZRARXlFLGamHEDpw8O+a5U1gYD4xn6I3a4f1vu+5IJeTvtO8l VAk/RyU1GN9Z0j7A0X0ZMYLi2GYLadWwWgwqFwShAaClmk6bCHelw7Uj1Wx95COg== Received: by recvd-94b86bfcc-wtcf9 with SMTP id recvd-94b86bfcc-wtcf9-1-6733A2C8-A 2024-11-12 18:47:36.296669654 +0000 UTC m=+5273461.582611631 Received: from herokuapp.com (unknown) by geopod-ismtpd-33 (SG) with ESMTP id prQD1ip7QaKxZyYlgzw-8Q for ; Tue, 12 Nov 2024 18:47:36.255 +0000 (UTC) Date: Tue, 12 Nov 2024 18:47:36 +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: byroot 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: 96573 X-SG-EID: =?us-ascii?Q?u001=2EKmNZ1u3n1vIpO8NNTdp+Q9c0ai7potxbEDLMO7SOJO=2F4KkRUz0d23466m?= =?us-ascii?Q?naiq=2F5fmA4hb60MdRMUAwHZnjIWVFu=2FrqiBOz5c?= =?us-ascii?Q?nOvkBudsSThFtk2VKYQlW3bYjqQlnmk0BIQqL7p?= =?us-ascii?Q?EYNvOO2q6uS=2FpGPC+x1woluIMBlLPX9W1R6hA4L?= =?us-ascii?Q?mfkeHijCai7CEeCOVnffFN7A0AjTMak9pzuArTc?= =?us-ascii?Q?4yLfungR5DMKL3hBmP8K=2FM+PCpbvfL9Q4VgvRcj?= =?us-ascii?Q?wwDjqCsZprVgd3dNdX8m4GghRw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: AHPGI4UVJIIN3CNKF2VXGTQ55GZFKSGW X-Message-ID-Hash: AHPGI4UVJIIN3CNKF2VXGTQ55GZFKSGW 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:119903] [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: "byroot (Jean Boussier) via ruby-core" Cc: "byroot (Jean Boussier)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20892 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #20892: `ObjectSpace.dump` can produce broken JSON for classes with temporary names https://bugs.ruby-lang.org/issues/20892 * Author: byroot (Jean Boussier) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- ```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/