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

Build fix: WK_LIBFUZZER_COVERAGE should default to trace-pc-guard when Fuzzilli is enabled #25421

Conversation

ddkilzer
Copy link
Contributor

@ddkilzer ddkilzer commented Mar 4, 2024

b3a8dd3

Build fix: WK_LIBFUZZER_COVERAGE should default to trace-pc-guard when Fuzzilli is enabled
https://bugs.webkit.org/show_bug.cgi?id=269796
<rdar://123317614>

Unreviewed build fix.

Enabling Fuzzilli failed to compile and link with
-fsanitize-coverage=trace-pc-guard.

The fix is to have separate OTHER_CFLAGS and OTHER_LDFLAGS for Fuzzilli
and LibFuzzer that both use the shared $(WK_SANITIZER_COVERAGE).

* Configurations/Sanitizers.xcconfig:
(WK_SANITIZER_OTHER_CFLAGS):
- Rearrange switches.
(WK_SANITIZER_OTHER_CPLUSPLUSFLAGS):
- Remove $(WK_LIBFUZZER_OTHER_CPLUSPLUSFLAGS_$(ENABLE_LIBFUZZER)) as it
  is not used.
(WK_SANITIZER_OTHER_LDFLAGS):
- Add $(WK_FUZZILLI_OTHER_LDFLAGS_$(ENABLE_FUZZILLI)).
(WK_SANITIZER_COVERAGE*):
- Rename from WK_LIBFUZZER_COVERAGE.
(WK_SANITIZER_COVERAGE_OTHER_FLAGS): Add.
- This is shared between Fuzzilli and LibFuzzer.
(WK_LIBFUZZER_OTHER_CFLAGS_YES):
(WK_LIBFUZZER_OTHER_LDFLAGS_YES):
(WK_FUZZILLI_OTHER_CFLAGS_YES): Add.
(WK_FUZZILLI_OTHER_LDFLAGS_YES): Add.
- Make use of $(WK_SANITIZER_COVERAGE_OTHER_FLAGS).

Canonical link: https://commits.webkit.org/275632@main

efccb60

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
  πŸ§ͺ ios-wk2-wpt βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios   πŸ§ͺ mac-wk2   πŸ§ͺ gtk-wk2
βœ… πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2   πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim
βœ… πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim

@ddkilzer ddkilzer requested a review from emw-apple as a code owner March 4, 2024 17:03
@ddkilzer ddkilzer self-assigned this Mar 4, 2024
@ddkilzer ddkilzer added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Mar 4, 2024
@ddkilzer ddkilzer added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 4, 2024
…n Fuzzilli is enabled

https://bugs.webkit.org/show_bug.cgi?id=269796
<rdar://123317614>

Unreviewed build fix.

Enabling Fuzzilli failed to compile and link with
-fsanitize-coverage=trace-pc-guard.

The fix is to have separate OTHER_CFLAGS and OTHER_LDFLAGS for Fuzzilli
and LibFuzzer that both use the shared $(WK_SANITIZER_COVERAGE).

* Configurations/Sanitizers.xcconfig:
(WK_SANITIZER_OTHER_CFLAGS):
- Rearrange switches.
(WK_SANITIZER_OTHER_CPLUSPLUSFLAGS):
- Remove $(WK_LIBFUZZER_OTHER_CPLUSPLUSFLAGS_$(ENABLE_LIBFUZZER)) as it
  is not used.
(WK_SANITIZER_OTHER_LDFLAGS):
- Add $(WK_FUZZILLI_OTHER_LDFLAGS_$(ENABLE_FUZZILLI)).
(WK_SANITIZER_COVERAGE*):
- Rename from WK_LIBFUZZER_COVERAGE.
(WK_SANITIZER_COVERAGE_OTHER_FLAGS): Add.
- This is shared between Fuzzilli and LibFuzzer.
(WK_LIBFUZZER_OTHER_CFLAGS_YES):
(WK_LIBFUZZER_OTHER_LDFLAGS_YES):
(WK_FUZZILLI_OTHER_CFLAGS_YES): Add.
(WK_FUZZILLI_OTHER_LDFLAGS_YES): Add.
- Make use of $(WK_SANITIZER_COVERAGE_OTHER_FLAGS).

Canonical link: https://commits.webkit.org/275632@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Build-fix-WK_LIBFUZZER_COVERAGE-should-default-to-trace-pc-guard-with-Fuzzilli branch from efccb60 to b3a8dd3 Compare March 4, 2024 17:46
@webkit-commit-queue
Copy link
Collaborator

Committed 275632@main (b3a8dd3): https://commits.webkit.org/275632@main

Reviewed commits have been landed. Closing PR #25421 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit b3a8dd3 into WebKit:main Mar 4, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 4, 2024
@ddkilzer ddkilzer deleted the eng/Build-fix-WK_LIBFUZZER_COVERAGE-should-default-to-trace-pc-guard-with-Fuzzilli branch March 4, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
3 participants