You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try Rosecheckers in Ubuntu22.04 (gcc 11.3.0), it reports many errors in standard libraries and then exits with an exception, in which case no CERT C violation is printed.
Here are some examples:
malloc
We run the Rosecheckers on device.c, and it shows that the arguments of attribute malloc not match. The malloc with arguments is introduced in gcc11, as mentioned here.
./rosecheckers/rosecheckers ../nemu/src/device/device.c -I../nemu/include -I../nemu/src/isa/riscv32/include -D__GUEST_ISA__=riscv32 -DCONFIG_RTC_MMIO=0xa0000048 -DCONFIG_VGA_CTL_MMIO=0xa0000100 -DCONFIG_FB_ADDR=0xa1000000 -DCONFIG_SERIAL_MMIO=0xa00003f8 -DCONFIG_SDCARD_CTL_MMIO=0xa3000000 -DCONFIG_SDCARD_IMG_PATH="abc" -DITRACE_COND=true
"/usr/include/stdlib.h", line 566: error: attribute "__malloc__" does not take
arguments
__attr_dealloc_free;
^
"/usr/include/stdlib.h", line 570: error: attribute "__malloc__" does not take
arguments
__THROW __attr_dealloc (reallocarray, 1);
^
"/usr/include/stdio.h", line 189: error: attribute "__malloc__" does not take
arguments
__attribute_malloc__ __attr_dealloc_fclose __wur;
^
……
Errors in Processing Input File: throwing an instance of "frontend_failed" exception due to syntax errors detected in the input code
SDL
We then run it on p-device.c, which is the preprocessed device.c, with the malloc with arguments removed. The #include stack of avx headers is: SDL.h -> SDL_cpuinfo.h -> immintrin.h -> avx...
./rosecheckers/rosecheckers nemu/p-device.c -I../nemu/include -I../nemu/src/isa/riscv32/include -D__GUEST_ISA__=riscv32 -DCONFIG_RTC_MMIO=0xa0000048 -DCONFIG_VGA_CTL_MMIO=0xa0000100 -DCONFIG_FB_ADDR=0xa1000000 -DCONFIG_SERIAL_MMIO=0xa00003f8 -DCONFIG_SDCARD_CTL_MMIO=0xa3000000 -DCONFIG_SDCARD_IMG_PATH="abc" -DITRACE_COND=true
"/usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h", line 1500: error:
invalid type conversion
return ((__m256d) __builtin_ia32_vinsertf128_pd256 ((__v4df)(__m256d)(_mm256_setzero_pd ()), (__v2df)(__m128d)(__A), (int)(0)));
^
"/usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h", line 1506: error:
invalid type conversion
return ((__m256) __builtin_ia32_vinsertf128_ps256 ((__v8sf)(__m256)(_mm256_setzero_ps ()), (__v4sf)(__m128)(__A), (int)(0)));
^
……
"/usr/lib/gcc/x86_64-linux-gnu/11/include/avx512fintrin.h", line 13345: error:
invalid type conversion
return (__m512d) __builtin_ia32_vfmsubpd512_mask ((__v8df) __A,
^
Errors in Processing Input File: throwing an instance of "frontend_failed" exception due to syntax errors detected in the input code
The problem of SDL also occurs in the provided docker, while the malloc does not due to the gcc version.
The text was updated successfully, but these errors were encountered:
When we try Rosecheckers in Ubuntu22.04 (gcc 11.3.0), it reports many errors in standard libraries and then exits with an exception, in which case no CERT C violation is printed.
Here are some examples:
We run the Rosecheckers on device.c, and it shows that the arguments of attribute malloc not match. The malloc with arguments is introduced in gcc11, as mentioned here.
We then run it on p-device.c, which is the preprocessed device.c, with the malloc with arguments removed. The #include stack of avx headers is: SDL.h -> SDL_cpuinfo.h -> immintrin.h -> avx...
The problem of SDL also occurs in the provided docker, while the malloc does not due to the gcc version.
The text was updated successfully, but these errors were encountered: