capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.27k stars 1.53k forks source link

SparcInstPrinter.c:361:17: error: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation] #1978

Closed XVilka closed 1 year ago

XVilka commented 1 year ago
FAILED: subprojects/capstone-next/libcapstone.a.p/arch_Sparc_SparcInstPrinter.c.o 
gcc-12 -Isubprojects/capstone-next/libcapstone.a.p -I../subprojects/capstone-next/include -I../subprojects/capstone-next/include/capstone -fdiagnostics-color=always -fsanitize=address,undefined -fno-omit-frame-pointer -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O2 -g --std=gnu99 -Werror=sizeof-pointer-memaccess -fvisibility=hidden -DASAN=1 -DRZ_ASSERT_STDOUT=1 -Wno-cpp -ftrivial-auto-var-init=pattern -funsigned-char -fPIC -DCAPSTONE_X86_ATT_DISABLE_NO -DCAPSTONE_X86_REDUCE_NO -DCAPSTONE_USE_SYS_DYN_MEM -DCAPSTONE_DIET_NO -DCAPSTONE_HAS_ARM -DCAPSTONE_HAS_ARM64 -DCAPSTONE_HAS_M68K -DCAPSTONE_HAS_M680X -DCAPSTONE_HAS_MIPS -DCAPSTONE_HAS_POWERPC -DCAPSTONE_HAS_SPARC -DCAPSTONE_HAS_SYSZ -DCAPSTONE_HAS_X86 -DCAPSTONE_HAS_XCORE -DCAPSTONE_HAS_TMS320C64X -MD -MQ subprojects/capstone-next/libcapstone.a.p/arch_Sparc_SparcInstPrinter.c.o -MF subprojects/capstone-next/libcapstone.a.p/arch_Sparc_SparcInstPrinter.c.o.d -o subprojects/capstone-next/libcapstone.a.p/arch_Sparc_SparcInstPrinter.c.o -c ../subprojects/capstone-next/arch/Sparc/SparcInstPrinter.c
../subprojects/capstone-next/arch/Sparc/SparcInstPrinter.c: In function ‘Sparc_printInst’:
../subprojects/capstone-next/arch/Sparc/SparcInstPrinter.c:361:17: error: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Werror=stringop-truncation]
  361 |                 strncpy(instr, mnem, sizeof(instr));
      |                 ^
cc1: all warnings being treated as errors
XVilka commented 1 year ago

Still a problem cc @DMaroo @Rot127: https://github.com/rizinorg/rizin/actions/runs/5210725233/jobs/9402155747?pr=3564#step:13:744