Closed ChrisLaspias closed 1 year ago
Hi @ChrisLaspias
snap_tool trace
command to produce the trace (currently, x86-only). This will execute the snapshot and print every instruction.Hi @ksteuck , Thank you for the quick answer. One last question. Is there a way to statically compile the snapshot into an executable (or with the help of snap_tool). I want to be able to run a snapshot without depending on dynamic linking.
Thank you for your time.
the answer depends on what you mean by "dynamic linking". The runner binary is always linked fully statically.
$ file bazel-bin/runner/reading_runner_main_nolibc
bazel-bin/runner/reading_runner_main_nolibc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[xxHash]=394d49c23eedd37a, not stripped
There are then two ways to load the corpus file into the runner. The default is to read corpus from a file (aka reading runner).
There's also an option to codegen Snapshots => C++ that can then be compiled into a self-contained (baked-in) runner binary. This latter option doesn't have good tooling around it and may be deprecated in the future. You can see an example of how this is done here. The TL;DR is genrule() => C++ => cc_library() => cc_binary()
HTH
@ksteuck Thank you very much for helping. That was exactly what I was looking for.
Hi silifuzz,
I use Silifuzz as part of my research and after walking a while through the codebase I wanted to ask you some questions.