google / google/oss-fuzz

Introspector build fails for glib-based projects

Open
#11,100 1 comment 2 reactions 1 assignee Claimed by @DavidKorczynski View on GitHub
Dominant language
Shell
Stars
12.7k
Forks
2.9k
Avg merge
2d 2h
Merged PRs (30d)
62

Description

The introspector build for glib itself [fails with](https://oss-fuzz-build-logs.storage.googleapis.com/log-adb388d8-66cc-4432-af5d-36491fff97d9.txt):

```
Step #6 - "compile-libfuzzer-introspector-x86_64": Checking if "GCC size_t typedef is long" compiles: NO
Step #6 - "compile-libfuzzer-introspector-x86_64":
Step #6 - "compile-libfuzzer-introspector-x86_64": meson.build:1692:2: ERROR: Problem encountered: Could not determine size of size_t.
Step #6 - "compile-libfuzzer-introspector-x86_64":
Step #6 - "compile-libfuzzer-introspector-x86_64": A full log can be found at /work/meson/meson-logs/meson-log.txt
```

Some other projects building glib as a meson subproject fail with the same issue:

- [cario](https://oss-fuzz-build-logs.storage.googleapis.com/log-9c2660e3-1158-43ba-9d8b-b9113cbd9723.txt)
- [fwupd](https://oss-fuzz-build-logs.storage.googleapis.com/log-eae5498f-aea6-44d7-ab88-94393eeb841a.txt)
- [ostree](https://oss-fuzz-build-logs.storage.googleapis.com/log-ba06e8aa-119b-4da7-b53a-40ca37810be6.txt)
- [rauc](https://oss-fuzz-build-logs.storage.googleapis.com/log-5b1e855a-21fb-4e7f-b970-91c89150ee66.txt)

Fuzz and coverage builds work fine, though.

For bluez, glib is [built during the container creation](https://github.com/google/oss-fuzz/blob/master/projects/bluez/Dockerfile) instead of via build.sh, which avoids this issue.

The [docs](https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/#runtime-dependencies) recommend static linking, but I'm not sure if there are benefits to compiling the subprojects with the sanitizer options.

How/where should this be fixed?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.