I am fuzzing a binary linked to musl with Qasan. Therefore I need to build libqasan with gcc-musl, which results in the error: `invalid application of 'sizeof' to incomplete type 'FILE'` at this line: https://github.com/AFLplusplus/AFLplusplus/blob/edaf3ad04d64185cae856c75ca4676cbb14a35b5/qemu_mode/libqasan/hooks.c#L213 Apparently in musl, FILE is opaque per the C standard, only glibc exposes its full definition. The best patch I found for this issue would be to do: ``` #ifdef __GLIBC__ #define QASAN_FILE_CHECK_SIZE sizeof(FILE) #else #define QASAN_FILE_CHECK_SIZE sizeof(void *) #endif ``` Not sure if the wrong size cause issue. AI says if it is lower, it wont cause false positive, but I don't know we can trust it. What do you think ?
Activity
vanhauser-thc commentedon Jun 26, 2026
The patch would work. But instead if would rather like something
whatever the define for muslibc is ...
please send a PR
celi0n commentedon Jun 26, 2026
Unfortunately it looks like it doesn't exist:
https://catfox.life/2022/04/16/the-musl-preprocessor-debate/
Ok i will open a PR
vanhauser-thc commentedon Jul 28, 2026
The proposed fix was wrong and impacted all other non-glibc
leinn32 commentedon Aug 14, 2026
Checking at it!
libqasan: build and hotpatch correctly on musl
chaitanya-bhardwaj commentedon Sep 10, 2026
Hi, seeing no activity here recently,
I'd like to work on this issue. Is it still open to take?
@vanhauser-thc
vanhauser-thc commentedon Sep 21, 2026
@Chaitanya-970 I do not think this is easily solvable.
vanhauser-thc commentedon Oct 25, 2026
fix is in dev