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 BD9FD1F44D for ; Thu, 18 Apr 2024 00:39:48 +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=GZJy3qk6; 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=iKawGbw+; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 132ED84378; Thu, 18 Apr 2024 00:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1713400781; bh=CGjhBqh907X9CseB9ld9+xUUI+ih5cF8BxxAdKKIu1E=; 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=GZJy3qk6PIMhuCF/MDoQQGiCvVcOLTAaf/LcjnJxhnMu1CtZwPfCLoSF/lSw2c4W9 BbFXrjz4+2TFzX0YmK39dzILYoC6Dd2JHhM1kI+RIxnrzhEEKRogXcSQHQi5g+BvMt t+PEpAAzZ/OkxZi3+LeINSrOaXAAuEtm6PQkJGXc= 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 1C6A484318 for ; Thu, 18 Apr 2024 00:39:37 +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=iKawGbw+; 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=KQ+TL4fS9f/qFpuvZvTcynRp9Gf4Jm2QUxRPoCjQ/f4=; b=iKawGbw+eo9GpbakqvqU2IlRybP2SfcOBNJb9jZavAMAFZrvBN/jtysk7j0rCt+/6zKG EPdZa/y1wTZEeHkkQgKVLsp6AZs7pnDDw0w8jDOdzcF/OqYEsusIN7pVFeANevdIc41yrD l5a6wBtR5F32IZOSeuRS6MLGt898UpDrhpYNum368Sf2GcHynP9V/W7GmXhvuhICkdc5dM +1VE0V2Z+amGyHSqW4NhwVv0H/W2/wqzqm7QZszdZiF710wduh2mV44c5ukBFYqDG+Wxe+ JntBoF0Pi1/4whTvPHzfu0PoURFRuO3xUnnqO3XdM1zNuzX795TiG5MnMOPULDkg== Received: by recvd-547d99795c-98hjf with SMTP id recvd-547d99795c-98hjf-1-66206BC8-3 2024-04-18 00:39:36.019404076 +0000 UTC m=+441496.480250537 Received: from herokuapp.com (unknown) by geopod-ismtpd-5 (SG) with ESMTP id 3UmpFHCWS6afRXHq8mbVfQ for ; Thu, 18 Apr 2024 00:39:35.973 +0000 (UTC) Date: Thu, 18 Apr 2024 00:39:36 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 20396 X-Redmine-Issue-Author: byroot X-Redmine-Issue-Priority: Normal X-Redmine-Sender: shyouhei 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: 94178 X-SG-EID: =?us-ascii?Q?u001=2EYb+gxajettXtIRRbovldwe1q9pj4BbUVLgkglfGACSriEdKOm=2FiYoqOLj?= =?us-ascii?Q?03lPXujlro4oiTXwkRMLtmbf5mY+2Uv33JJiwU+?= =?us-ascii?Q?ZJeKxsg2=2FpY4aczJLLKAMOCL1crDPTFTSP5Z9j6?= =?us-ascii?Q?CmcP80sGGqfjOOm4UnYJm8j5yhVzEqf=2F1Oj8zDy?= =?us-ascii?Q?jdU1OG7iMkc858dVcH3o9z+WrAGar7m3WSHid=2FH?= =?us-ascii?Q?jpqKGycf85Mq2Onhf+vRdywe1yW+U9b92Ht2nEU?= =?us-ascii?Q?3csyoFPgaY2PT+2tJtKPDZWbjA=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: 2UXZN4YLNYQM5ZIJKVSYK7GT2O4H5IY2 X-Message-ID-Hash: 2UXZN4YLNYQM5ZIJKVSYK7GT2O4H5IY2 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:117582] [Ruby master Feature#20396] ObjectSpace.dump_all(string_value: false): skip dumping the String contents List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "shyouhei (Shyouhei Urabe) via ruby-core" Cc: "shyouhei (Shyouhei Urabe)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20396 has been updated by shyouhei (Shyouhei Urabe). I'm not sure if I'm in favor of this request then. ObjectSpace.dump_all is very much analogous to a coredump. Both are very handy on occasions. I don't doubt your experience of finding memory leak is real. But... People normally don't try to cruft a coredump. One do often include sensitive info, but being able to access to a coredump is a big threat already. We normally strictly restrict access to them. The same thing can go for ObjectSpace.dump_all output. I wrote "I prefer simple API for ObjectSpace.dump_all" because, I'm pretty sure this is not the last thing you wanted for the output. People need to filter out some objects fields, order by something, group by something, having a histogram, ... and pretty sure we would end up need an entire SQL engine. My preference is this method should remain as simple as possible, and let `jq(1)` etc., having that business. ---------------------------------------- Feature #20396: ObjectSpace.dump_all(string_value: false): skip dumping the String contents https://bugs.ruby-lang.org/issues/20396#change-107982 * Author: byroot (Jean Boussier) * Status: Open ---------------------------------------- `ObjectSpace.dump_all` is a very useful method to debug memory leaks and such, hence is frequently needed in production. But since all the 7bit strings content is included in the dump, it incur the risk of leaking personal data, or secrets. Also, in many case the strings content isn't that helpful and is just making the dump much bigger for no good reason. And only pure-ASCII strings are dumped this way, which means all the tools that process these dumps should already be compatible with a dump without any string content. ### Feature I propose to add another optional parameter to `dump_all`: `string_value: false`. When passed, no String content is ever dumped regardless of its coderange. Implementation: https://github.com/ruby/ruby/pull/10382 cc @zzak -- 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/