Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
* - Refactored setup.py to remove hacks regarding packaging of wheels for different platforms, improve and cleanup the code
- Updated README.txt
- Removed old Makefile and build_wheel.sh scripts
- Created a new workflow that takes care of building and testing python packages for different platforms/architectures/python versions
* Added SPDX headers to the setup.py
* - cstest_py: Fixed positional argument since it doesn't accept a `required` flag. It turns to have a mandatory tests folder path
- integration_tests.py: Use pathlib to determine the required path
- GitHub action: Simplified the tests execution command
* GitHub Actions: Run python 3.8 (lowest) and 3.13 (current highest) for native runners only during testings and the rest during tag release
* GitHub Action:
- Fixed the cibw_build matrix element
- Added a step to prepare artifact name
* GitHub Action: Added run_tests.py script to run all tests during CI workflow
* - Added SPDX headers to the run_tests.py script and to the build-wheels-publish.yml workflow file
- Minor fixes to the workflow as pointed out in the PR review
- Updated MANIFEST.in to reflect the actual libraries built during python wheel creation process
- Use subprocess.run in place of os.system in run_tests.py script
* GitHub Action:
- Run qemu step only if non-native Linux runner
- Added arch:universal2 matrix element for macos-latest runner
* Python bindings: Refreshed the list of files needed to be copied for sdist archive
* GitHub Action: Commented out arch:x86 matrix elements
* GitHub Action: Run qemu step only if non-native Linux runner
* GitHub Action: Minor fixes
* Python bindings: Added missing .in pattern when collecting src files for sdist archive
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Waiting to run
Fixes UB caused by various mismatches on how these arguments are passed
and read. This became visible when running on PowerPC hosts with e.g.
`cstool -d aarch64 204862f8`.
Apart from the UB fix, this is meant to be a pure refactor.
Partially addresses #2458
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
* Remove internal code from API
* Fix compatibility headers and test the generation of them
* Cancel all previous test workflows on new push.
* Add valgrind test
* Replace asserts with macros for AArch64, Alpha, LoongArch, Mips, SystemZ inc files.
* Add missing clearing of MCInst
* Ensure correct dir name is used.
* Replace asserts in inc files for PPC, ARM, TriCore
* Replace all asserts in modules with CS_ASSERT.
Also enable the CS_ASSERTs if CMAKE_BUILD_TYPE=Debug
* Formatting
* Fix Pn was printed as register, not predicate.
* Fix: is_alias must be an int to allow for -1 as false.
* Fix, shift immediate was casted to incorrect width.
* Store theexact float also in fp field for convenience.
* Fix: MRS has no implicit write of NCVZ
* Fix signs of Imm8 shifted operands.
* Fix another MRS test
* Fix: Src operand of CASAL had write flag set.
* Fix sysop access in Python data structures.
* Fix#2381
* Fix#2382
* Fix post-index correction only for pop with single register
* Fix missing memory index register scale
* Remove faulty and duplicated lshift field.
* Add shift information to shift alias instructions and add several tests.
* Fix scale tests
---------
Co-authored-by: Wu ChenXu <kabeor00@gmail.com>
* Remove Windows msvc project files and move build instructions to single BUILDING.md file.
* Move HACK.txt to Contributing and update it.
* Add refactoring guide.
* Add known bugs
* Remove compatibility headers.
* Fix smaller issues.
* Remove 'possible revert' column. People always can do manual changes.
* Move instruction alias description to the top
* Add table to general breaking changes.
* Update general release guide with the newest information.
* Highlight NanoMips and be more precise in writing.
* Add note about archs without alias.
* Add sentence about what is planned.
* Small corrections for Windows build instructions and debug macros.
* Fix rebase issues.
* Bring back make.sh for the CI
* Fix CID 508418 - Uninitialized struct
* Fix CID 509089 - Fix OOB read and write
* Fix CID 509088 - OOB.
Also adds tests and to ensure no OOB access.
* Fix CID 509085 - Resource leak.
* Fix CID 508414 and companions - Using undefined values.
* Fix CID 508405 - Use of uninitialized value
* Remove unnecessary and badly implemented dev fuzz code.
* Fix CID 508396 - Uninitialzied variable.
* Fix CID 508393, 508365 -- OOB read.
* Fix CID 432207 - OVerlapping memory access.
* Remove unused functions
* Fix CID 432170 - Overlapping memory access.
* Fix CID 166022 - Check for negative index
* Let strncat not depend n src operand.
* Fix 509083 and 509084 - NULL dereference
* Remove duplicated code.
* Initialize sysop
* Fix resource leak
* Remove unreachable code.
* Remove duplicate code.
* Add assert to check return value of cmoack
* Fixed: d should be a signed value, since it is checked against < 0
* Add missing break.
* Add NULL check
* Fix signs of binary search comparisons.
* Add explicit cast of or result
* Fix correct scope of case.
* Handle invalid integer type.
* Return UINT_MAX instead of implicitly casted -1
* Remove dead code
* Fix type of im
* Fix type of d
* Remove duplicated code.
* Add returns after CS_ASSERTS
* Check for len == 0 case.
* Ensure shift operates on uint64
* Replace strcpy with strncpy.
* Handle edge cases for 32bit rotate
* Fix some out of enum warnings
* Replace a strcpy with strncpy.
* Fix increment of address
* Skip some linting
* Fix: set instruction id
* Remove unused enum
* Replace the last usages of strcpy with SStream functions.
* Increase number of allowed AArch64 operands.
* Check safety of incrementing t the next operand.
* Fix naming of operand
* Update python constants
* Fix option setup of CS_OPT_DETAIL_REAL
* Document DETAIL_REAL has to be used with CS_OPT_ON.
* Run Coverity scan every Monday.
* Remove dead code
* Fix OOB read
* Rename macro to reflect it is only used with sstreams
* Fix rebase issues
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Failing after 0s
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Has been cancelled
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Has been cancelled
* Add AArch64 linux build again.
* Enable package build also for PRs and pushes.
* Fix: don't append python version to injected platform name.
* Add musllinux build to wheel checking script
* Trigger wheel upload only on published full-releases.
* Remove duplicate workflow file
* Ensure all artifacts are moved to the same directory 'dist'
* Enable verbose twine upload.
* Add step to show downloaded artifacts for debugging.
* resolve conflict for loongarch and RISCV in Mapping.c and Mapping.h
* Use RISCV_get_detail for simplicity
Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
* Use detail_is_set for simplicity
Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
* Change comment style
Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
* remove redundant add_str
* fix bug for RISCV_add_detail
* fix operands for csr instructions
* add python binding and tester for RISC-V
* add more test cases for RISC-V (M,A,F,D,C instructions)
* fix incorrect operand and access for sc.w and sc.d
* fix incorrect operand for fence and sfence.vma
* assert -> CS_ASSERT
* some instructions in test_riscv.c should be RISCV64
* add cs details test
* update python testers
---------
Co-authored-by: Rot127 <45763064+Rot127@users.noreply.github.com>
* Run clang-format
* Remove arm.h header from AArch64 files
* Update all AArch64 module files to LLVM-18.
* Add check if the differs save file is up-to-date with the current files.
* Add new generator for MC test trnaslation.
* Fix warnings
* Update generated AsmWriter files
* Remove unused variable
* Change MCPhysReg type to int16_t as LLVM 18 dictates.
With LLVM 18 the MCPhysReg value's type is changed to int16_t.
If we update modules to LLVM 18, they will generate
compiler warnings that uint16_t* should not be casted to int16_t*.
This makes changing the all tables to int16_t necessary, because the alternative is
to duplicate all MCPhysReg related code. Which is even worse.
* Assign enum values to raw_struct member
* Add printAdrAdrpLabel def
* Add header to regression test files.
* Write files to build dir and ignore more parsing errors.
* Fix parsing of MC test files.
* Reset parser after every block
* Add write and patch header step.
* Add and update MC tests for AArch64
* Fix clang-tidy warnings
* Don't warn about padding issues.
They break automatically initialized structs we can not change easily.
* Fix: Incorrect access of LLVM instruction descriptions.
* Initialize DecoderComplete flag
* Add more mapping and flag details
* Add function to get MCInstDesc from table
* Fix incorrect memory operand access types.
* Fix test where memory was not written, ut only read.
* Attempt to fix Windows build
* Fix 2268
The enum values were different and hence lead to different decoding.
* Refactor SME operands.
- Splits SME operands in Matrix and Predicate operands.
- Fixes general problems of incorrect detections with
the vector select/index operands of predicate registers.
- Simplifies code.
* Fix up typo in WRITE
* Print actual path to struct fields
* Add Registers of SME operands to the reg-read list
* Add tests for SME operands.
* Use Capstone reg enum for comparison
* Fix tests: 'Vector arra...' to 'operands[x].vas'
* Add the developer fuzz option.
* Fix Python bindings for SME operands
* Fix variable shadowing.
* Fix clang-tidy warnings
* Add missing break.
* Fix varg usage
* Brackets for case
* Handle AArch64_OP_GROUP_AdrAdrpLabel
* Fix endian issue with fuzzing start bytes
* Move previous sme.pred to it's own operand type.
* Fix calculation for imm ranges
* Print list member flag
* Fix up operand strings for cstest
* Do only a shallow clone of the cmocka stable branch
* Fix: Don't categorize ZT0 as a SME matrix operand.
* Remove unused code.
* Add flag to distinguish Vn and Qn registers.
* Add all registers to detail struct, even if emitted in the asm text
* Fix: Increment op count after each list member is added.
* Remove implicit write to NZCV for MSR Imm instructions.
* Handle several alias operands.
* Add details for zero alias with za0.h
* Add SME tile to write list if written
* Add write access flags to operands which are zeroed.
* Add SME tests of #2285
* Fix tests with latest syntax changes.
* Fix segfault if memory operand is only a label without register.
* Fix python bindings
* Attempt to fix clang-tidy warning for some configurations.
* Add missing test file (accidentially blocked by gitignore.)
* Print clang-tidy version before linting.
* Update differ save file
* Formatting
* Use clang-tidy-15 as if possible.
* Remove search patterns for MC tests, since they need to be reworked anyways.
* Enum to upper case change
* Add information to read the OSS fuzz result.
* Fix special case of SVE2 operands.
Apparently ZT0 registers can an index attached,
get which is BOUND to it. We have no "index for reg" field.
So it is simply saved as an immediate.
* Handle LLVM expressions without asserts.
* Ensure choices are always saved.
* OP_GROUP enums can't be all upper case because they contain type information.
* Fix compatibility header patching
* Update saved_choices.json
* Allow mode == None in test_corpus
* Initial auto-sync LoongArch support
- Accompanied llvm changes: https://github.com/capstone-engine/llvm-capstone/pull/45
- MC Tests are generated from llvm
- Instruction groups are implemented
- Register accesses are implemented
- Memory operands are handled for memory instructions
- Code are formatted using clang-format of LLVM 17
- Import tests from LLVM MC
- Collect operand type and access
- Collect registers read/modified
---------
Co-authored-by: CoA <1109673069@qq.com>
* Ensure same indent for all patched lines.
* Emit upper case OP_GROUP enum
* Spell all enum values in capital letters.
* Capticalize enums in loongarch_detail.c
* Add test which contains now a tab.
* Run clang-format on test_loongarch.c
---------
Co-authored-by: CoA <1109673069@qq.com>
Co-authored-by: Rot127 <unisono@quyllur.org>
* Add test with ASAN enabled.
* Fix leaks in cstool and cs.c
* Add work around so ASAN binaries don't DEADSIGNAL due to too many randomized address bits.
* Add ASAN build arguments to cstest
* Fix leaks in cstest
* Use cstest binary build by the main build.
* Add clonging step for cmocka when cstest is build
* Skip Python tests for ASAN
* Remove make build from CI
* Fix leaks in cstest.
- Rewrite split to remove leaks and improve runtime by 6%
- Add free()
* Fix cmocka external project to stable branch.
* Revert "Fix leaks in cstest."
This reverts commit bf8ee125b0c58f9c794eb081a69c80f8a71825cd.
* Fix memleaks in cstest
* Document adding of ASAN job to release guide
* Add CAPSTONE_BUILD_CSTEST to build docs
* Fix double free
* Add more detail tests to CI and fix them
* Initialize variables
* Fix typo
* Update cstest build docs
* Revert "Remove make build from CI"
This reverts commit 84f7360c6da6183cd41bec0fef3e1d0a2ee49ddf.
* Make cstest only run for cmake builds.
* Add cstest job for make build.
* Add CAPSTONE_DIET build test.
* Compile the compatibility header test with ASAN if enabled.
* Fix DIET build by excluding not used code.
* Missing "
* Build static library with ASAN and DIET if enabled.
* Revert "Add CAPSTONE_DIET build test."
This reverts commit 71e1469dee.
* Restructure auto-sync docs to have them more contained in suite/auto-sync
* Enhance Differ documentation
* Fix link and emphasize importance of ARCHITECTURE.md
* Add auto-syc intro.md document, based on @moste00 work
* Be consistent with Auto-Sync naming and use python3
Refactor auto-sync updater
This refactors the auto-sync updater scripts, adds multiple tests and some other smaller things:
- Converts the updater in a proper Python package.
- Renaming was done to fit this new package structure.
- Format code with usort and black and enforce it with the CI.
- Add license information to auto-sync scripts.
- Update tree-sitter-cpp to v20.0.5
- Fix py-tree-sitter version to `< 0.22.0` due to https://github.com/tree-sitter/tree-sitter-cpp/issues/250
- Allow file/dir creation of non existing paths.
- Add CI tests for Patch, inc gen, translation and diff persistence testing.
- Implement editing of diffs with an editor.
- Fix: Add Namespace id also to anonymous enumeration members.