Commit Graph

12 Commits

Author SHA1 Message Date
david942j
10db5f4f8c
[next][SuperH] Fix missing setting detail->sh (#2466)
Some checks failed
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 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Waiting to run
Run clang-tidy / clang-tidy (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (macos-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (windows-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / publish (push) Blocked by required conditions
Python Package CI / build (macOS-14, 3.12) (push) Waiting to run
Python Package CI / build (macOS-14, 3.8) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.12) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.8) (push) Waiting to run
Python Package CI / build (windows-2022, 3.12) (push) Waiting to run
Python Package CI / build (windows-2022, 3.8) (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) Failing after 0s
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
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (ubuntu-latest) (push) Failing after 0s
RELEASE BUILD - PyPI 📦 Distribution / Make SDist (push) Failing after 0s
* [next][SuperH] Fix missing setting detail->sh

detail->sh is never set. Which makes the detailed output related to operands is always missing.

Signed-off-by: david942j <david942j@gmail.com>

* Fix merge commit

---------

Signed-off-by: david942j <david942j@gmail.com>
2024-09-19 19:03:29 +08:00
Lucas Azevedo
67d975662e
[next] SH: Use bitwise OR with mask for sign extension (#2389)
Some checks failed
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 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Waiting to run
Run clang-tidy / clang-tidy (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (macos-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (windows-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / publish (push) Blocked by required conditions
Python Package CI / build (macOS-14, 3.12) (push) Waiting to run
Python Package CI / build (macOS-14, 3.8) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.12) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.8) (push) Waiting to run
Python Package CI / build (windows-2022, 3.12) (push) Waiting to run
Python Package CI / build (windows-2022, 3.8) (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) Failing after 1s
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
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (ubuntu-latest) (push) Failing after 1s
RELEASE BUILD - PyPI 📦 Distribution / Make SDist (push) Failing after 1s
Auto-Sync / check (push) Has been cancelled
* Use bitwise OR with mask for sign extension

Sign extend using bitwise OR with mask, instead of unary minus.
Fixes error when building for UWP with Security Development Lifecycle (SDL).
See https://learn.microsoft.com/en-us/cpp/build/reference/sdl-enable-additional-security-checks?view=msvc-170

* Remove unused store

Remove unused store caught by clang-tidy.

* Suppress clang-tidy false positive

Ignore an unitialized va_list false positive emitted by clang-tidy

---------

Co-authored-by: Wu ChenXu <kabeor00@gmail.com>
2024-09-19 01:09:54 +08:00
Rot127
3a2cd3c331
Coverity defects (#2469)
* 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
2024-09-18 21:19:42 +08:00
RainRat
b91c727481
fix typos (#2344) 2024-04-30 10:37:53 +08:00
Ced2911
e9284b6b36
check if decode[idx] is callable (#2322) 2024-04-23 21:58:40 +08:00
Rot127
97290921ac Initialize rw 2023-05-13 03:52:15 -05:00
Rot127
d1b97799b5 Update indentation 2023-05-11 11:45:33 -05:00
Rot127
7326053a0b Fix SH build warnings. 2023-05-11 09:15:12 -05:00
Rot127
854153e7c9 [SH] Fix several unused variable warnings. 2023-03-06 21:35:22 -05:00
Rot127
cd469285dd [SH] Fix unsued function warnings. 2023-02-24 13:52:09 -05:00
Yoshinori Sato
15bebb5cca Fix include path.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2022-11-14 16:21:34 +09:00
Yoshinori Sato
b681153238 sh: superh support backend.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2022-10-12 20:11:12 +09:00