Project

General

Profile

Actions

Feature #20396

open

ObjectSpace.dump_all(string_value: false): skip dumping the String contents

Added by byroot (Jean Boussier) about 1 month ago. Updated 20 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:117341]

Description

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 (zzak _)

Actions

Also available in: Atom PDF

Like1
Like0Like0Like0Like0Like0Like0Like0