Commit graph

344 commits

Author SHA1 Message Date
Anton Kochkov
f1e555901f
ci: use muon-bootstrap name for bootstrap (#4700) 2024-11-04 13:17:03 +08:00
Rot127
86d8953912
librz/arch: use proper capstone enum names. (#4691)
* Use pre-v5 enum names which are now supported by compatibility macros.
* Bump CS version to newest next
* Remove Capstone v6 job until v6 patch release is out.
* Check for support of enum compare/conversion warnings.
2024-10-29 17:11:34 +08:00
Khairul Azhar Kasmiran
7d63546451
mac ci: Make PATH invariant to installed Python version (#4689) 2024-10-26 00:05:51 +08:00
Rot127
f82993a30d
librz/arch: capstone v6 update (without MIPS) (#4662)
* Bumps Capstone version to newest Capstone next (beyond first v6-Alpha1).
* Fixes leaks
* Fixes build and change to AArch64 and SystemZ compatibility headers.
* Marks M68k test as broken (see commit message).
* Fix AArch64 and SystemZ tests
* Handle op.size == 0 for x86 IL ops
2024-10-25 00:07:07 +08:00
Anton Kochkov
2fafb3dbe5
ci: add Python 3.13 for macOS builders (#4688) 2024-10-25 00:05:04 +08:00
Khairul Azhar Kasmiran
2e831b278f
mac ci: Drop pkg-config install step (#4685) 2024-10-23 23:29:39 +08:00
Khairul Azhar Kasmiran
f641480afa
ci: Reinstate macos-meson-clang-tests build on macos-13 (#4682)
* Revert "Upgrade build-osx-pkg build to macos-14 (#4677)"
* Revert "ci: Remove macos-12 build (#4676)"
* Upgrade macos builds to macos-13
* Add fetch-depth: 2 to build-osx-pkg build
* Add -Wno-deprecated-non-prototype flag to `macos-meson-clang-tests` build
2024-10-23 17:32:51 +08:00
Khairul Azhar Kasmiran
1a8b3c632e
Upgrade build-osx-pkg build to macos-14 (#4677)
* Upgrade build-osx-pkg build to macos-14
* Update test-osx-pkg build to macos-14
2024-10-19 18:01:54 +08:00
Khairul Azhar Kasmiran
f2a6d2a56c
ci: Remove macos-12 build (#4676) 2024-10-17 21:32:36 +08:00
Khairul Azhar Kasmiran
07d70e9dc6
Install rzpipe in "Run debug tests on Ubuntu 20.04" build (#4668) 2024-10-14 10:52:08 +08:00
Khairul Azhar Kasmiran
5f3f68b483
macos ci: Use hw.activecpu instead of hw.ncpu (#4660) 2024-10-03 20:06:23 +08:00
Khairul Azhar Kasmiran
4ba246aafd
ci: limit macOS test threads to hw.ncpu (#4658) 2024-10-03 17:20:08 +08:00
wargio
a29c2c3e7c Run memhungry fuzzed binaries in one thread. 2024-09-13 12:20:39 +08:00
wargio
15f97e3e0c Compile jsdec in EXTRA_PREFIX with the correct branch
aaaa
2024-09-04 21:16:17 +08:00
Anton Kochkov
7ef842f813 ci: use new CentOS 7 mirror URL 2024-08-15 20:43:59 +08:00
Khairul Azhar Kasmiran
7b91fb69c2
Revert #4506 (#4519) 2024-05-27 21:50:58 +08:00
Giovanni
d19fc9d0d8
Add N_THREAD_LIMIT to limit the max number of threads (upper limit). (#4510) 2024-05-24 16:12:08 +08:00
Rot127
1228d4dc58
Add all supported architectures to the labeler (#4381)
* Add labeling for all missing architectures
2024-03-25 19:07:42 +08:00
Rot127
fb6efca4b5
[Hexagon] RzIL uplifiting (#3837)
Uplift Hexagon architecture to RzIL

The general structure is, that every (sub-)instruction has a getter for it's RzIL code.
Calling the getter will return the RzIL operation.
If RzIL for an instruction is requested, the plugin makes a decision. Because Hexagon only executes whole instruction packets. If the instruction is not the last instruction in a packet, it will simply return `EMPTY()`. If the RzIL for the last instruction in a packet is requested, it will get the RzIL operations for all instructions in the packet, shuffles them into the correct execution order (according to some rules) and returns the complete operation for the packet.

The RzIL code was entirely generated with the [rzil-compiler](https://github.com/Rot127/rzil-compiler/), using the semantic definition of the [QEMU Hexagon module](https://github.com/qemu/qemu/tree/master/target/hexagon).

Currently successful compile instructions (and tested):
```
[*] 1581/1733 standard instructions compiled.
[*] 431/643 HVX instructions compiled.
[*] In total: 2012/2376 instructions compiled.
```

It was tested with:
- (Semantic tests) `rz-tracetest` against the execution trace of the QEMU Hexagon test binaries.
- (Bug free and semi-semtantic test) Adding tests which simply execute the test binaries to ensure leak and segfault free execution. Also it is executed until a certain instruction is reached (end of `main` or `loc.pass` symbol), partially testing it executes correctly.

For the uplifting several changes and modernization had to be made:

- Enhance consistency of decoding
  - Allow to disassemble an instruction without copying the result. This is used if the given buffer of instruction bytes is larger than one instruction width. In this case, as many instructions as the buffer can hold are disassembled and buffered for later.
  - Generally enhance buffering of instructions.
  - Allow to mark a packet as valid before it is completely decoded (in case we know it must be valid, e.g. if it is a jump target of a valid packet).
- Fix (hopefully) all memory leaks of the Hexagon plugin.
- Changes to register getters, because RzIL needs finer control to translate alias or explicit register names to their real register.
  - Getter for register name is now done by table, so for future distinction between DSP version we can just select another table.
  - Translation functions from register alias or explicit name to their real register.
  - Each operand contains now it's variable ID (e.g. `d` for register `Rd`) as in the ISA (for mapping in the RzIL code).
- Ease debugging by tracking in more precision, if an instruction is added to a stale, active or new packet.
- Add registers `C20` - `C29` (not yet present in LLVM)
- Some renaming to make the code more readable.
2024-03-22 07:24:56 +00:00
Rot127
c78eff25a3
Work around for https://github.com/google/sanitizers/issues/1716 (#4362)
The Thread Sanitizer of ASAN doesn't seem to support
randomized offsets from the VMA base address (`vm.mmap_rnd_bits`)
if they are larger than 28 bits.

This leads to ASAN compiled binaries to crash or endless loop
with a `AddressSanitizer:DEADLYSIGNAL` before main is reached.

Reference issues:
https://github.com/google/sanitizers/issues/1716
https://github.com/google/sanitizers/issues/1724
2024-03-16 13:45:51 +08:00
billow
30eef53291 dwarf: refactor
- Remove dwarf's dependency on RzBuffer

- Delete `cdwarf.c` and move dwarfdump (`id`) related functions to their respective modules

- Improved output of dwarfdump (`id`)

- add more DW_AT*

- fix escape

- fix debuglink

- remove cache in RzBinDwarfStr

- replace `rz_bin_dwarf_rnglists_parse_at` with `rz_bin_dwarf_rnglists_get`

- remove rz_bin_dwarf_loclists_parse_at

- fix logging

- cache all escaped strings
2024-03-09 09:41:13 +08:00
wargio
05ab831b9a Fix codeowners and labeler 2024-03-08 12:33:07 +08:00
wargio
0de960d891 Ignore python R1737
This ignores warning 'yield from' directly instead of yielding
each element one by one (use-yield-from)
2024-03-07 18:38:49 +08:00
Giovanni
411e6fd09f
Fix jsdec build (#4264) 2024-02-19 09:10:30 +08:00
Giovanni
3fd3db406e
Update github actions to remove warnings (#4211) 2024-02-12 16:32:19 +08:00
byteninjaa0
8cfd11b104
Update tools help and man pages (#4145)
* Update man pages
* Update help messages
2024-02-01 00:24:38 +08:00
Anton Kochkov
046918075e
Use git depth 1 for Meson subprojects (#4138)
* Use git depth 1 for Meson subprojects
* Disable git depth on Debian CI
2024-01-22 21:14:32 +08:00
Anton Kochkov
fc4dfbf9da Fix CentOS and Alpine CI jobs 2024-01-21 07:15:41 +08:00
Aditya
b82eadc2e4
Add simple POST-command and changed upload path (remote) (#4106) 2024-01-17 15:17:36 +08:00
Khairul Azhar Kasmiran
036a712f35
Remove work dir change of rz-bindgen plugin test (#4022) 2023-12-05 22:03:28 +08:00
Riccardo Schirone
3ef81c0e12 ci: use default meson even in create-tarball 2023-12-01 23:32:17 +08:00
Riccardo Schirone
1311095ce9 Revert "ci: downgrade Meson to 1.2.3 (#3991)"
This reverts commit 6aeea82800.
2023-12-01 23:32:17 +08:00
Anton Kochkov
6aeea82800
ci: downgrade Meson to 1.2.3 (#3991) 2023-11-21 09:55:29 +08:00
billow
444000416c
Add debuginfod support (#3954)
* Add DEBUGINFOD_URLS support
* Add rz_bin_dwarf_from_debuginfod
* Fix rz_bin_dwarf_attr_addr
* Add test for debuginfod
* Filter empty RzBinDWARF
2023-11-06 23:41:42 +08:00
Anton Kochkov
539f8cb197 Fix macOS CI jobs 2023-11-05 19:10:14 +08:00
billow
9cd67098da
Update db/archos/linux-x64/dbg_dmh dmh allocated (#3956)
* Update `db/archos/linux-x64/dbg_dmh dmh allocated`
* Fix `scr.color` in rz_heap_glibc.h
2023-11-05 17:03:26 +08:00
Rot127
b16471fa53
Remove Capstone 3 (fix CS 4 & 5) (#3934)
* Remove macros checking for CS_API_VERSION 3

* Remove CS 3 from meson_options and subprojects.

* Remove Capstone v3 from CI

* Remove CS_API_VERSION >= 4 checks since always true from now on.

* Add CSv5 workflow to CI.

* Handle ARM pre v6 build errors.

* Fix PPC build errors for CS < v6

* Fix correct macro name

* Remove wrong include.

* Fix fallthrough warning

* Fix getter macros for WB and post-fix flags.

* Fix faulty macro name

* Check for all float extensions for vabs.

* Add return to assert cases.

* Update cs to 46154e8605aaefdcca5fecf4ea88b92db5a40ad3

* Remove cs3 wrap file.

---------

Co-authored-by: wargio <wargio@libero.it>
2023-10-25 18:30:15 +08:00
Riccardo Schirone
19dbb57739 ci: switch to softprops/action-gh-release 2023-10-11 10:01:40 +02:00
Anton Kochkov
71679b0800
Fix CI build 2023-09-26 08:03:54 +08:00
Dhruv Maroo
714c338e0f
Remove designated array initializers in rz_analysis.h (#3876)
* Do not use designater array initializer because MSVC complains
* Add new Appveyor CI test for including C headers from C++ files

    * Need to test whether Rizin headers can be included in C++ when
      using MSVC, needed for Cutter to build successfully
    * Changed the name of `build-cpp` CI job in GitHUb jobs to
      `build-cpp-linux` to make it obvious that it only performs the
      test for Linux
2023-09-26 07:36:40 +08:00
Anton Kochkov
833c59c6eb
Pin Meson to 0.61.5 for old CentOS and Debian (#3887) 2023-09-25 20:29:43 +08:00
Anton Kochkov
ab23bb0bf8
issue template: hide warning message (#3886)
As many reporters do not remove it, make it a comment instead
2023-09-25 17:00:19 +08:00
Anton Kochkov
3278ec77d0
ci: use clang-format from LLVM 16 (#3696)
Co-authored-by: wargio <wargio@libero.it>
2023-08-01 09:11:26 +08:00
Anton Kochkov
b30cd7fc83
Update TinyCC CI job (#3683) 2023-07-21 17:10:25 +08:00
yossizap
4aadd18f7e Set the default capstone version to v5 instead of v4
Co-authored-by: wargio <wargio@libero.it>
2023-07-16 13:22:47 +08:00
Giovanni
b943e1d05f
Ensure the concurrency job group is unique (#3538) 2023-05-30 17:55:08 +08:00
Giovanni
f03e1d5114
Automatically cancel any previous workflow on new push. (#3510) 2023-05-20 13:10:50 +08:00
Riccardo Schirone
8d4c12cf9a Add CI job for testing EXTRA_PREFIX 2023-05-19 16:42:35 +02:00
Anton Kochkov
8ef2d9a6ad Fix Debian Stretch builds 2023-04-26 20:01:47 +08:00
Anton Kochkov
d2de771c3d Use meson setup <dir> instead of meson <dir> 2023-04-26 20:01:47 +08:00