Skip to content

cairo: fix fuzz-introspector integration - #16082

Open
kenohassler wants to merge 5 commits into
google:masterfrom
kenohassler:fix-cairo
Open

cairo: fix fuzz-introspector integration#16082
kenohassler wants to merge 5 commits into
google:masterfrom
kenohassler:fix-cairo

Conversation

@kenohassler

@kenohassler kenohassler commented Aug 31, 2026

Copy link
Copy Markdown

Fuzz introspector builds of cairo were broken since Feb. 2025, presumably due to an incompatibility with the meson build system. Fix this by removing -fuse-ld=gold from CFLAGS (as discussed in #7583).

The second important change is that I moved all external dependencies to build in the Dockerfile. This is recommended by fuzz-introspector to focus reports on the actual target code, instead of diluting coverage data with dependency code.

I intend to use the now-working fuzz-introspector analysis for some harness improvements (still working on that).

@github-actions

Copy link
Copy Markdown

kenohassler is a new contributor to projects/cairo. The PR must be approved by known contributors before it can be merged. The past contributors are: OwenSanzas, hunsche, Teemperor, tysmith, DonggeLiu, salmonx, Google-Autofuzz, inferno-chromium, ecalp-tps

@kenohassler
kenohassler marked this pull request as draft September 1, 2026 08:45
@kenohassler

Copy link
Copy Markdown
Author

I found a problem when building on a clean /out directory; essentially my workaround for excluding subprojects (deleting them) is a little too harsh. So I'm moving the build step into the Dockerfile instead, as recommended by fuzz-introspector (https://fuzz-introspector.readthedocs.io/en/latest/user-guides/control-instrumentation.html).

@kenohassler

kenohassler commented Sep 2, 2026

Copy link
Copy Markdown
Author

Thank you for greenlighting the CI. If there's anything that needs to be changed, let me know.

Btw: I saw in the git history that the base image was previously (unsuccessfully) bumped to ubuntu 24. I already tested it on top of my changes and it seems to be working fine now, I'll open a second PR after this is one merged.

@kenohassler

Copy link
Copy Markdown
Author

I found a typo in the build script (missing dollar sign), so I had to add a commit, and while at it, I also bumped to ubuntu 24.

Fuzz introspector builds of cairo were broken since Feb. 2025,
presumably due to an incompatibility with the meson build system.
Also:
- upgrade meson
- remove external dependencies from Dockerfile
- exclude external code from fuzz-introspector reports
Comment thread projects/cairo/Dockerfile
meson subprojects foreach \
ninja -C _builddir install
# *convince* fuzz-introspector not to analyze all harnesses in subprojects
RUN rm -rf cairo/subprojects/*

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this because the FUZZ_INTROSPECTOR_CONFIG set in build.sh did not prevent fuzz-introspector from analyzing the subprojects folder.

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.

1 participant