Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64/ARM64] Update to Capstone v6/auto-sync #3963

Closed
wants to merge 54 commits into from

Conversation

Rot127
Copy link
Member

@Rot127 Rot127 commented Nov 6, 2023

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

Updates the AArch64/ARM64 module to Capstone's v6/auto-sync version.

Requires capstone-engine/capstone#2026 to be merged

Test plan

  • Test build with different CS ver. < 6
  • All green

Closing issues

...

@XVilka
Copy link
Member

XVilka commented Nov 6, 2023

One more warning to fix upstream:

gcc -Isubprojects/capstone-auto-sync-aarch64/libcapstone.a.p -I../subprojects/capstone-auto-sync-aarch64/include -I../subprojects/capstone-auto-sync-aarch64/include/capstone -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -O3 --std=gnu99 -Werror=sizeof-pointer-memaccess -fvisibility=hidden -DRZ_ASSERT_STDOUT=1 -Wno-cpp -fPIC -DCAPSTONE_X86_ATT_DISABLE_NO -DCAPSTONE_X86_REDUCE_NO -DCAPSTONE_USE_SYS_DYN_MEM -DCAPSTONE_DIET_NO -DCAPSTONE_HAS_ARM -DCAPSTONE_HAS_AARCH64 -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 -DCAPSTONE_HAS_TRICORE -MD -MQ subprojects/capstone-auto-sync-aarch64/libcapstone.a.p/arch_AArch64_AArch64InstPrinter.c.o -MF subprojects/capstone-auto-sync-aarch64/libcapstone.a.p/arch_AArch64_AArch64InstPrinter.c.o.d -o subprojects/capstone-auto-sync-aarch64/libcapstone.a.p/arch_AArch64_AArch64InstPrinter.c.o -c ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:39:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64GenAsmWriter.inc: In function ‘AArch64InstPrinterValidateMCOperand’:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:72:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64GenAsmWriter.inc:33530:13: note: ‘Imm’ was declared here
33530 | static bool AArch64InstPrinterValidateMCOperand(const MCOperand *MCOp,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:39:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:72:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64GenAsmWriter.inc:33530:13: note: ‘Imm’ was declared here
33530 | static bool AArch64InstPrinterValidateMCOperand(const MCOperand *MCOp,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:39:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:72:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64GenAsmWriter.inc:33530:13: note: ‘Imm’ was declared here
33530 | static bool AArch64InstPrinterValidateMCOperand(const MCOperand *MCOp,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:39:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:892:1: note: ‘Imm’ was declared here
  892 | AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:892:1: note: ‘Imm’ was declared here
  892 | AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:72:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64GenAsmWriter.inc:33530:13: note: ‘Imm’ was declared here
33530 | static bool AArch64InstPrinterValidateMCOperand(const MCOperand *MCOp,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64InstPrinter.c:39:
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:892:1: note: ‘Imm’ was declared here
  892 | AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:892:1: note: ‘Imm’ was declared here
  892 | AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:892:1: note: ‘Imm’ was declared here
  892 | AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:840:34: error: ‘Imm’ may be used uninitialized [-Werror=maybe-uninitialized]
  840 |                         if (Parts[i] != Parts[0]) \
      |                                  ^
../subprojects/capstone-auto-sync-aarch64/arch/AArch64/AArch64AddressingModes.h:892:1: note: ‘Imm’ was declared here
  892 | AArch64_AM_isSVEMoveMaskPreferredLogicalImmediate(int64_t Imm)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
[7/2061] Compiling C object subprojects/capstone-auto-sync-aarch64/libcapstone.a.p/arch_AArch64_AArch64Disassembler.c.o
[8/2061] Compiling C object subprojects/capstone-auto-sync-aarch64/libcapstone.a.p/arch_ARM_ARMDisassembler.c.o
ninja: build stopped: subcommand failed.

@Rot127
Copy link
Member Author

Rot127 commented Nov 7, 2023

Weird. I disabled the warning. It is not correct. Will look into it later this week.

@Rot127 Rot127 force-pushed the dist-capstone-v6-aarch64 branch from 2c3ed26 to 9336e09 Compare November 16, 2023 15:59
@Rot127 Rot127 force-pushed the dist-capstone-v6-aarch64 branch from 618a35e to dda2ce5 Compare November 27, 2023 18:51
@Rot127 Rot127 force-pushed the dist-capstone-v6-aarch64 branch from 1685cbb to 2070f2b Compare November 30, 2023 15:00
@Rot127 Rot127 force-pushed the dist-capstone-v6-aarch64 branch from 3efcc6e to a49b747 Compare November 30, 2023 15:29
@Rot127 Rot127 force-pushed the dist-capstone-v6-aarch64 branch from a49b747 to 411670f Compare November 30, 2023 16:05
@Rot127
Copy link
Member Author

Rot127 commented Nov 30, 2023

Superseded by #4011

@Rot127 Rot127 closed this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants