felixge / traceutils

Code for decoding and encoding runtime/trace files as well as useful functionality implemented on top.
MIT License
86 stars 7 forks source link

anonymize breaks trace #3

Closed dominikh closed 1 year ago

dominikh commented 1 year ago
$ go tool trace -d staticcheck.trace | wc -l
2023/04/15 04:10:12 Parsing trace...
277357

$ ./traceutils anonymize staticcheck.trace staticcheck.trace.anon 

$ go tool trace -d staticcheck.trace.anon | wc -l
2023/04/15 04:10:28 Parsing trace...
failed to parse trace: unknown event type 55 at offset 0x1adcd2
0

I've attached the original trace and the resultant anonymized trace. staticcheck.trace.anon.gz staticcheck.trace.gz

felixge commented 1 year ago

Thanks for reporting this 🙇‍♂️. I started working on improving this code the other day and will take this issue into account!

felixge commented 1 year ago

This should be fixed now. Additionally anonymize is now more aggressive in order to prevent any potential reversing of the obfuscation. I also added a strings command to verify the output.