seemoo-lab / VirtFuzz

VirtFuzz is a Linux Kernel Fuzzer that uses VirtIO to provide inputs into the kernels subsystem. It is built with LibAFL.
GNU General Public License v3.0
108 stars 6 forks source link

error: array subscript 64 is above array bounds of 'long unsigned int[64]' [-Werror=array-bounds=] #2

Closed selfbypass closed 3 months ago

selfbypass commented 3 months ago

Hi, I met some questions when building it. For instance, ./include/asm-generic/percpu.h:21:44: error: array subscript 64 is above array bounds of 'long unsigned int[64]' [-Werror=array-bounds=] 21 | #define per_cpu_offset(x) (__per_cpu_offset[x]) ./include/linux/compiler-gcc.h:35:33: note: in definition of macro 'RELOC_HIDE' 35 | (typeof(ptr)) (__ptr + (off)); \ | ^~~ ./include/linux/percpu-defs.h:236:9: note: in expansion of macro 'SHIFT_PERCPU_PTR' 236 | SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); ... Does it happen to you? Or what's the gcc/clang version?

selfbypass commented 3 months ago

Hi, I met some questions when building it. For instance, ./include/asm-generic/percpu.h:21:44: error: array subscript 64 is above array bounds of 'long unsigned int[64]' [-Werror=array-bounds=] 21 | #define per_cpu_offset(x) (__per_cpu_offset[x]) ./include/linux/compiler-gcc.h:35:33: note: in definition of macro 'RELOC_HIDE' 35 | (typeof(ptr)) (__ptr + (off)); | ^~~ ./include/linux/percpu-defs.h:236:9: note: in expansion of macro 'SHIFT_PERCPU_PTR' 236 | SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))); ... Does it happen to you? Or what's the gcc/clang version?

Fixed. Gcc-8 can work.