Skip to content
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

all: follow up on libfuzzer change #220

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

josharian
Copy link
Collaborator

See the commit message for details about what has changed and why.

I do not have ready access to a linux box to test that go-fuzz-build -libfuzzer still works after this change. I'd love it if someone could do a sanity check. (I should have done that on the previous PR!)

Changes of note:

* Add instructions on README
* Switch from using 'var _ = _go_fuz_dep_.Main' to
  'var _ = _go_fuz_dep_.CoverTab' to avoid
  "imported but not used" errors in instrumented code.
  This is because CoverTab is always present,
  but libFuzzer code doesn't need Main.
* Switch from a format string to text/template to
  generate the main package.
* Rework the 'go build' command at the core of buildInstrumentedBinary.
  Passing an empty "extraBuildFlags" to go build does not work:
  go build interprets the empty string as a package name.
  Also, don't bother renaming outf; it gets renamed (for libfuzzer)
  or read and deleted (for go-fuzz) later.
* Extract shared code from go-fuzz-dep main.go/main_libFuzzer.go,
  so that the only code in each is truly specific to that target.
@josharian josharian requested a review from dvyukov March 12, 2019 19:48
@dvyukov dvyukov merged commit ee722ec into dvyukov:master Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants