leakcanary icon indicating copy to clipboard operation
leakcanary copied to clipboard

Add option to keep string contents in HprofPrimitiveArrayStripper

Open pyricau opened this issue 4 years ago • 0 comments

HprofPrimitiveArrayStripper clears all primitive arrays, erasing any and all PII. However strings can be super useful to analyze leak traces (e.g. thread name, scope name, etc). We could keep track of all byte or char arrays (depending on version), write down the string class id when we encounter it, then for every string mark the corresponding array, and at the end write down all arrays, keeping the string marked ones intact. This option can be used if you make sure to not keep sensitive information in strings in the app.

pyricau avatar Jun 29 '21 09:06 pyricau