On 22.12.2025 17:53, Jan Beulich wrote:
> ... on x86, to make sure its bit-rotting can be limited at least a little.
> 
> Signed-off-by: Jan Beulich <[email protected]>
> 
> --- a/tools/fuzz/Makefile
> +++ b/tools/fuzz/Makefile
> @@ -4,6 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
>  SUBDIRS-y :=
>  SUBDIRS-y += libelf
>  SUBDIRS-y += x86_instruction_emulator
> +SUBDIRS-$(CONFIG_X86_64) += cpu-policy
>  
>  .PHONY: all clean distclean install uninstall
>  all clean distclean install uninstall: %: subdirs-%
> 

As it turns out this causes build failures on Ubuntu (and only there, and only
with gcc, which I don't understand):

afl-policy-fuzzer.c: In function 'main':
afl-policy-fuzzer.c:153:9: error: ignoring return value of 'fread', declared 
with attribute warn_unused_result [-Werror=unused-result]
         fread(cp, sizeof(*cp), 1, fp);
         ^
cc1: all warnings being treated as errors

Given how the code uses calloc() up front I don't really see why evaluating
the return value would actually be meaningful here, so I'm inclined to add a
cast to void (provided that would make a difference, which I have yet to
check). Opinions?

Jan

Reply via email to