Skip to content

cmd/compile, cmd/link: use libFuzzer 8-bit instead of extra counters #51318

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

Closed

Conversation

kyakdan
Copy link
Contributor

@kyakdan kyakdan commented Feb 22, 2022

By using libFuzzer’s 8-bit counters instead of extra counters, the
coverage instrumentation in libFuzzer mode is improved in three ways:
1- 8-bit counters are supported on all platforms, including macOS and
Windows, with all relevant versions of libFuzzer, whereas extra
counters are a Linux-only feature that only recently received
support on Windows.
2- Newly covered blocks are now properly reported as new coverage by
libFuzzer, not only as new features.
3- The NeverZero strategy is used to ensure that coverage counters
never become 0 again after having been positive once. This resolves
issues encountered when fuzzing loops with iteration counts that
are multiples of 256 (e.g., larger powers of two).

@gopherbot
Copy link
Contributor

This PR (HEAD: fce40f8) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 1:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 074c9dd) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 28781ec) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 3e0442f) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 3:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 4:

(8 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 4:

(5 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: a039aba) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 5: Code-Review+2

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 1d4e1ab) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 6: Run-TryBot+1 Auto-Submit+1 Code-Review+2 Trust+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 6: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 6: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 6:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: da6823c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 6:

(7 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 7: Run-TryBot+1 Code-Review+2

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 7: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 7:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Dmitri Shuralyov:

Patch Set 7: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@kyakdan kyakdan force-pushed the libfuzzer-8bit-counters branch from da6823c to a2410f4 Compare May 17, 2022 07:49
@gopherbot
Copy link
Contributor

This PR (HEAD: a2410f4) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@kyakdan kyakdan force-pushed the libfuzzer-8bit-counters branch from a2410f4 to dcc9767 Compare May 17, 2022 08:02
@gopherbot
Copy link
Contributor

This PR (HEAD: dcc9767) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 8:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 9: Code-Review+2

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

By using libFuzzer’s 8-bit counters instead of extra counters, the
coverage instrumentation in libFuzzer mode is improved in three ways:
  1- 8-bit counters are supported on all platforms, including macOS and
     Windows, with all relevant versions of libFuzzer, whereas extra
     counters are a Linux-only feature that only recently received
     support on Windows.
  2- Newly covered blocks are now properly reported as new coverage by
     libFuzzer, not only as new features.
  3- The NeverZero strategy is used to ensure that coverage counters
     never become 0 again after having been positive once. This resolves
     issues encountered when fuzzing loops with iteration counts that
     are multiples of 256 (e.g., larger powers of two).
@kyakdan kyakdan force-pushed the libfuzzer-8bit-counters branch from dcc9767 to 9057e4b Compare May 18, 2022 08:50
@gopherbot
Copy link
Contributor

This PR (HEAD: 9057e4b) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/387334 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Khaled Yakdan:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/387334.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request May 20, 2022
By using libFuzzer’s 8-bit counters instead of extra counters, the
coverage instrumentation in libFuzzer mode is improved in three ways:
  1- 8-bit counters are supported on all platforms, including macOS and
     Windows, with all relevant versions of libFuzzer, whereas extra
     counters are a Linux-only feature that only recently received
     support on Windows.
  2- Newly covered blocks are now properly reported as new coverage by
     libFuzzer, not only as new features.
  3- The NeverZero strategy is used to ensure that coverage counters
     never become 0 again after having been positive once. This resolves
     issues encountered when fuzzing loops with iteration counts that
     are multiples of 256 (e.g., larger powers of two).

Change-Id: I9021210d7fbffd07c891ad08750402ee91cb3df5
GitHub-Last-Rev: 9057e4b
GitHub-Pull-Request: #51318
Reviewed-on: https://go-review.googlesource.com/c/go/+/387334
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/387334 has been merged.

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