Skip to content

Commit 73cb2e0

Browse files
committed
rs, sys: bump capstone to 6.0.0-Alpha6
1 parent 231b928 commit 73cb2e0

File tree

316 files changed

+35277
-23410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

316 files changed

+35277
-23410
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- New operands types are added to `ArmOperandType`
1616

1717
### Changed
18-
- Bump bundled capstone to 6.0.0-Alpha5
18+
- Bump bundled capstone to 6.0.0-Alpha6
1919
- Rename ARM64 to AARCH64, SYSZ to SYSTEMZ to follow upstream changes
2020
- AArch64 support is rewritten to follow upstream changes
2121
- Endian must be specified for Sparc/SystemZ, since little endian support is added

capstone-rs/src/arch/alpha.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub enum AlphaOperandType {
4848
Reg(RegId),
4949

5050
/// Immediate
51-
Imm(i32),
51+
Imm(i64),
5252

5353
/// Invalid
5454
Invalid,

capstone-rs/src/arch/m68k.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ impl M68kOpMem {
381381

382382
define_m68k_getter!(
383383
/// Indirect displacement
384-
=> in_disp: u32
384+
=> in_disp: i32
385385
);
386386

387387
define_m68k_getter!(
388388
/// other displacement
389-
=> out_disp: u32
389+
=> out_disp: i32
390390
);
391391

392392
define_m68k_getter!(
@@ -479,6 +479,9 @@ mod test {
479479
width: 0,
480480
offset: 0,
481481
index_size: 0,
482+
disp_size: 0,
483+
in_disp_size: 0,
484+
out_disp_size: 0
482485
};
483486

484487
#[test]

capstone-rs/src/test.rs

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ fn test_instruction_details() {
596596
"je",
597597
b"\x74\x05",
598598
&[JUMP],
599-
&[X86_REG_EFLAGS],
600-
&[X86_REG_EIP],
599+
&[X86_REG_EFLAGS, X86_REG_RIP],
600+
&[X86_REG_RIP],
601601
),
602602
(
603603
"call",
@@ -610,11 +610,23 @@ fn test_instruction_details() {
610610
"ret",
611611
b"\xc3",
612612
&[RET],
613-
&[X86_REG_RSP],
613+
&[X86_REG_RSP, X86_REG_SS],
614614
&[X86_REG_RIP, X86_REG_RSP],
615615
),
616-
("syscall", b"\x0f\x05", &[INT], &[], &[]),
617-
("iretd", b"\xcf", &[IRET], &[], &[]),
616+
(
617+
"syscall",
618+
b"\x0f\x05",
619+
&[INT],
620+
&[],
621+
&[X86_REG_EFLAGS, X86_REG_RCX, X86_REG_RIP, X86_REG_R11],
622+
),
623+
(
624+
"iretd",
625+
b"\xcf",
626+
&[IRET],
627+
&[X86_REG_EFLAGS, X86_REG_ESP, X86_REG_SS],
628+
&[X86_REG_EFLAGS, X86_REG_EIP, X86_REG_ESP],
629+
),
618630
(
619631
"sub",
620632
b"\x48\x83\xec\x08",
@@ -785,8 +797,8 @@ fn test_syntax() {
785797
"je",
786798
b"\x74\x05",
787799
&[JUMP],
788-
&[X86_REG_EFLAGS],
789-
&[X86_REG_EIP],
800+
&[X86_REG_EFLAGS, X86_REG_RIP],
801+
&[X86_REG_RIP],
790802
),
791803
(
792804
"call",
@@ -801,11 +813,25 @@ fn test_syntax() {
801813
"retq",
802814
b"\xc3",
803815
&[RET],
804-
&[X86_REG_RSP],
816+
&[X86_REG_RSP, X86_REG_SS],
805817
&[X86_REG_RSP, X86_REG_RIP],
806818
),
807-
("syscall", "syscall", b"\x0f\x05", &[INT], &[], &[]),
808-
("iretd", "iretl", b"\xcf", &[IRET], &[], &[]),
819+
(
820+
"syscall",
821+
"syscall",
822+
b"\x0f\x05",
823+
&[INT],
824+
&[],
825+
&[X86_REG_EFLAGS, X86_REG_RCX, X86_REG_RIP, X86_REG_R11],
826+
),
827+
(
828+
"iretd",
829+
"iretl",
830+
b"\xcf",
831+
&[IRET],
832+
&[X86_REG_EFLAGS, X86_REG_ESP, X86_REG_SS],
833+
&[X86_REG_EFLAGS, X86_REG_EIP, X86_REG_ESP],
834+
),
809835
(
810836
"sub",
811837
"subq",
@@ -2685,6 +2711,9 @@ fn test_arch_m68k_detail() {
26852711
width: 0,
26862712
offset: 0,
26872713
index_size: 0,
2714+
disp_size: 0,
2715+
in_disp_size: 0,
2716+
out_disp_size: 0,
26882717
};
26892718

26902719
test_arch_mode_endian_insns_detail(

capstone-sys/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [UNRELEASED] - YYYY-MM-DD
88
### Changed
99
- Rename ARM64 to AARCH64, SYSZ to SYSTEMZ to follow upstream changes
10-
- Bump bundled capstone to 6.0.0-Alpha5
10+
- Bump bundled capstone to 6.0.0-Alpha6
1111

1212
## [0.18.0] - 2026-01-04
1313
### Added

capstone-sys/capstone/.clang-format

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ AlignConsecutiveAssignments: false
1515
AlignConsecutiveDeclarations: false
1616
AlignEscapedNewlines: DontAlign
1717
AlignOperands: true
18-
AlignTrailingComments:
19-
Kind: Always
20-
OverEmptyLines: 2
18+
AlignTrailingComments: false
2119
AllowAllParametersOfDeclarationOnNextLine: false
2220
AllowShortBlocksOnASingleLine: false
2321
AllowShortCaseLabelsOnASingleLine: false

capstone-sys/capstone/.github/workflows/CITest.yml

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ jobs:
5454
build_type: 'Debug'
5555
}
5656
- {
57-
name: 'ubuntu-22.04 x64 release - assert warn',
57+
name: 'ubuntu-22.04 x64 debug - assert warn',
5858
os: ubuntu-22.04,
5959
arch: x64,
6060
build-system: 'cmake',
6161
diet-build: 'OFF',
6262
enable-asan: 'OFF',
63-
build_type: 'Release',
63+
build_type: 'Debug',
6464
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=ON'
6565
}
6666
- {
67-
name: 'ubuntu-22.04 x64 release - no asserts',
67+
name: 'ubuntu-22.04 x64 release - no assert warnings',
6868
os: ubuntu-22.04,
6969
arch: x64,
7070
build-system: 'cmake',
@@ -73,6 +73,16 @@ jobs:
7373
build_type: 'Release',
7474
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=OFF'
7575
}
76+
- {
77+
name: 'ubuntu-22.04 x64 release - assert warn',
78+
os: ubuntu-22.04,
79+
arch: x64,
80+
build-system: 'cmake',
81+
diet-build: 'OFF',
82+
enable-asan: 'OFF',
83+
build_type: 'Release',
84+
build_options: '-DCAPSTONE_ASSERTION_WARNINGS=ON'
85+
}
7686
- {
7787
name: 'ubuntu-24.04 x64 ASAN',
7888
os: ubuntu-24.04,
@@ -112,10 +122,10 @@ jobs:
112122
run: |
113123
mkdir build && cd build
114124
# build static library
115-
cmake -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ASAN=${asan} -DCAPSTONE_BUILD_DIET=${diet_build} ${build_option} ..
125+
cmake -DCMAKE_BUILD_TYPE=${build_type} -DCAPSTONE_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ASAN=${asan} -DCAPSTONE_BUILD_DIET=${diet_build} ${build_option} ..
116126
cmake --build . --config ${build_type}
117127
# build shared library
118-
cmake -DCAPSTONE_INSTALL=1 -DCAPSTONE_BUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ${build_option} ..
128+
cmake -DCMAKE_BUILD_TYPE=${build_type} -DCAPSTONE_INSTALL=1 -DCAPSTONE_BUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_PREFIX=/usr -DCAPSTONE_BUILD_CSTEST=ON -DENABLE_ASAN=${asan} ${build_option} ..
119129
sudo cmake --build . --config ${build_type} --target install
120130
121131
- name: Lower number of KASL randomized address bits
@@ -137,6 +147,16 @@ jobs:
137147
run: |
138148
sh suite/run_invalid_cstool.sh
139149
150+
- name: cstest negatives
151+
if: startsWith(matrix.config.build-system, 'cmake')
152+
run: |
153+
ctest --test-dir build --output-on-failure -R NegativeTests1
154+
ctest --test-dir build --output-on-failure -R NegativeTests2
155+
ctest --test-dir build --output-on-failure -R NegativeTests3
156+
ctest --test-dir build --output-on-failure -R NegativeTests4
157+
ctest --test-dir build --output-on-failure -R NegativeTests5
158+
ctest --test-dir build --output-on-failure -R NegativeTests6
159+
140160
- name: cstest MC
141161
if: startsWith(matrix.config.build-system, 'cmake')
142162
run: |
@@ -167,15 +187,23 @@ jobs:
167187
run: |
168188
sudo apt-get -y update
169189
sudo apt-get -y install valgrind
170-
valgrind cstest tests
171-
172-
- name: Comaptibility header generation
173-
if: startsWith(matrix.config.build-system, 'cmake')
190+
valgrind --leak-check=full cstest tests/details
191+
valgrind --leak-check=full cstest tests/features
192+
valgrind --leak-check=full cstest tests/issues
193+
valgrind --leak-check=full cstest tests/MC
194+
195+
- name: Compatibility header generation
196+
# clang-format-17 is only available in Ubuntu 24.04
197+
# Hence the check only happens for it.
198+
if: startsWith(matrix.config.build-system, 'cmake') && startsWith(matrix.config.os, 'ubuntu-24.04')
174199
run: |
200+
sudo apt-get -y update
201+
sudo apt-get -y install clang-format-17
202+
clang-format-17 --version
175203
cp ./include/capstone/arm64.h arm64_compat_current.h
176204
cp ./include/capstone/systemz_compatibility.h systemz_compat_current.h
177-
./suite/auto-sync/src/autosync/HeaderPatcher.py -c --v6 ./include/capstone/aarch64.h --v5 ./include/capstone/arm64.h
178-
./suite/auto-sync/src/autosync/HeaderPatcher.py -c --v6 ./include/capstone/systemz.h --v5 ./include/capstone/systemz_compatibility.h
205+
./suite/auto-sync/src/autosync/HeaderPatcher.py -C ./.clang-format -c --v6 ./include/capstone/aarch64.h --v5 ./include/capstone/arm64.h
206+
./suite/auto-sync/src/autosync/HeaderPatcher.py -C ./.clang-format -c --v6 ./include/capstone/systemz.h --v5 ./include/capstone/systemz_compatibility.h
179207
diff ./include/capstone/arm64.h arm64_compat_current.h &&
180208
diff ./include/capstone/systemz_compatibility.h systemz_compat_current.h
181209
@@ -192,6 +220,14 @@ jobs:
192220
platform: windows
193221
python-arch: x64
194222
python-version: '3.9'
223+
diet_build: false
224+
- name: 'windows x64 MSVC 64bit DIET'
225+
os: windows-latest
226+
arch: x64
227+
platform: windows
228+
python-arch: x64
229+
python-version: '3.9'
230+
diet_build: true
195231

196232
steps:
197233
- uses: actions/checkout@v4
@@ -210,6 +246,6 @@ jobs:
210246
shell: bash
211247
run: |
212248
cmake --version
213-
cmake --preset=${{ matrix.config.platform }}-x64
214-
cmake --build --preset build-${{ matrix.config.platform }}-release
215-
cmake --build --preset install-${{ matrix.config.platform }}-release
249+
cmake --preset=${{ matrix.config.platform }}-x64${{ matrix.config.diet_build == true && '-diet' || '' }}
250+
cmake --build --preset build-${{ matrix.config.platform }}${{ matrix.config.diet_build == true && '-diet' || '' }}-release
251+
cmake --build --preset install-${{ matrix.config.platform }}${{ matrix.config.diet_build == true && '-diet' || '' }}-release

0 commit comments

Comments
 (0)