From 053fe8d68272e04e963a2a0b786beefce9c3821d Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 13 Oct 2022 23:28:30 +0200 Subject: [PATCH] Upgrade capstone and remove the patch --- shlr/Makefile | 2 +- shlr/capstone-patches/v5/invfree.patch | 39 -------------------------- shlr/meson.build | 2 +- 3 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 shlr/capstone-patches/v5/invfree.patch diff --git a/shlr/Makefile b/shlr/Makefile index de876f40e0..dc975d2e2c 100644 --- a/shlr/Makefile +++ b/shlr/Makefile @@ -39,7 +39,7 @@ ifeq ($(USE_CS4),1) CS_TIP=a7cac8352f7397aa73bb2e2dcc1b6cdb2e1b8461 CS_BRA=v4 else -CS_TIP=eea96543fa976326333e0d209d390ad03ced6e1f +CS_TIP=ba2199042700e6bda2e0069e924370a7b2530ac0 CS_BRA=next endif ifeq ($(CS_COMMIT_ARCHIVE),1) diff --git a/shlr/capstone-patches/v5/invfree.patch b/shlr/capstone-patches/v5/invfree.patch deleted file mode 100644 index 9155cf3ba8..0000000000 --- a/shlr/capstone-patches/v5/invfree.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/arch/AArch64/AArch64GenAsmWriter.inc b/arch/AArch64/AArch64GenAsmWriter.inc -index 0cfe199..de9c4d0 100644 ---- a/arch/AArch64/AArch64GenAsmWriter.inc -+++ b/arch/AArch64/AArch64GenAsmWriter.inc -@@ -26297,7 +26296,7 @@ static char *printAliasInstr(MCInst *MI, SStream *OS, MCRegisterInfo *MRI) - } - } while (AsmString[I] != '\0'); - } -- free(AsmString); -+ cs_mem_free(AsmString); - return tmpString; - } - -diff --git a/suite/synctools/asmwriter.py b/suite/synctools/asmwriter.py -index 9636c13..b1d18b5 100755 ---- a/suite/synctools/asmwriter.py -+++ b/suite/synctools/asmwriter.py -@@ -788,7 +788,7 @@ for line in lines: - } - } while (AsmString[I] != '\\0'); - } -- free(AsmString); -+ cs_mem_free(AsmString); - return tmpString; - } - """) -diff --git a/utils.c b/utils.c -index 194e070..efb9da7 100644 ---- a/utils.c -+++ b/utils.c -@@ -91,7 +91,7 @@ unsigned int count_positive8(const unsigned char *list) - - char *cs_strdup(const char *str) - { -- size_t len = strlen(str)+ 1; -+ size_t len = strlen(str) + 1; - void *new = cs_mem_malloc(len); - - if (new == NULL) diff --git a/shlr/meson.build b/shlr/meson.build index 36325e6eec..75876110d9 100644 --- a/shlr/meson.build +++ b/shlr/meson.build @@ -19,7 +19,7 @@ if not capstone_dep.found() or not get_option('use_sys_capstone') patches_files = [] # NOTE: when you update CS_TIP or CS_BRA, also update them in shlr/Makefile if capstone_version == 'v5' - CS_TIP = 'eea96543fa976326333e0d209d390ad03ced6e1f' + CS_TIP = 'ba2199042700e6bda2e0069e924370a7b2530ac0' CS_BRA = 'next' patches_files = [ 'fix-x86-16.patch',