-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reverse a stack trace of a executable file that was built with -seed=random
?
#696
Comments
Yes you are correct if you want to reverse panics you need to save the random seed. |
But garble doesn't print the random seed it uses? How do I get the random seed? |
Line 247 in 059c1d6
You're right the seed is only printed when an error occured, I think it got printed in all cases before. We should definitely fix this. |
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Apr 9, 2023
The seedFlag.random field had never worked, as my refactor in December 2021 never set it to true. Even if the boolean was working, we only printed the random seed when we failed. It's still useful to see it when a build succeeds, for example when wanting to reproduce the same binary or when wanting to reverse a panic from the produced binary. Add a test this time. Fixes burrowers#696.
mvdan
added a commit
that referenced
this issue
Apr 9, 2023
The seedFlag.random field had never worked, as my refactor in December 2021 never set it to true. Even if the boolean was working, we only printed the random seed when we failed. It's still useful to see it when a build succeeds, for example when wanting to reproduce the same binary or when wanting to reverse a panic from the produced binary. Add a test this time. Fixes #696.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
garble build -seed=random main.go
, themain.go
has some panic inside and prints stack trace.main
executable file and copy output tostack.txt
.garble reverse main.go stack.txt
.garble -seed=random reverse main.go stack.txt
.What did you expect to see?
Step 3 and 4 print the un-obfuscated stack trace.
What did you see instead?
Step 3. nor 4. prints the un-obfuscated stack trace.
Question
garble -seed=X reverse main.go stack.txt
would prints the un-obfuscated stack trace if X is the value of the random seed used by step 1, right? So can we print the random seed upongarble -seed=random build
for later reverse usage?The text was updated successfully, but these errors were encountered: