[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

Matt Morehouse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 19 09:02:16 PDT 2018


morehouse added a comment.

You can probably get rid of the llvm-objcopy code and make this a lot simpler with something like:

1. Call `getSection()` on the Binary object to get the text section.
2. Read the `sh_offset` and `sh_size` of that section.
3. Copy `sh_size` bytes from the start of the binary buffer + `sh_offset` into your executable memory.
4. Run it.


Repository:
  rC Clang

https://reviews.llvm.org/D49526





More information about the cfe-commits mailing list