212 Commits
Author SHA1 Message Date
pancake 3ba122ae11 Remove the PICK and RPICK ESIL operations
radare2 removed them and r2ghidra no longer emits them.
2026-11-06 21:46:53 +01:00
pancake f462d70936 Fix register offset compatibility and Linux CI builds 2026-11-06 18:56:00 +01:00
pancake 849d04c2eb Remove the ESIL aliases that do not exist in radare2
Drop ASL, >>>>, <<<, >>>, SIGN, POPCOUNT and S2D in favor of the r2
names <<, ASR, ROL, ROR, ~, POPCNT and I2D. The ops without an r2
equivalent are kept.
2026-11-06 18:56:00 +01:00
pancake 725363c4de Support delay slots like radare2 does
- Take the branch set by SETJT and SETD after its delay slot executes
- Make the delayed branch state conditional under symbolic conditions
  so the pc forks after the slot
- Check returns and automerge jumps after their delay slot
- Add a mips test for calls, branches and returns with delay slots
2026-11-06 18:56:00 +01:00
pancake 91c68f7891 Fix reading memory on big endian targets
The bytes were reversed into a copy that was dropped right away, so
reads were little endian while writes were big endian.
2026-11-06 18:56:00 +01:00
pancake a7a8a52715 Align the ESIL operations with radare2 master
- Add CLZ, POPCNT, ROT, [3], =[3], F!=, F<=, F*+, ~=, SETJT, SETJTS,
  SETD, BITS, #! and r=
- Pop two values in TRAP and one in () like r2 does
- Make $jt, $js and $ds push the jump target and delay slot state
- Fix $b checking the wrong bit, $p for concrete values and $s > 63
- Compare signed at the register size in <, >, <= and >=, and set
  the flag state like == does
- Set the previous and current values on pokes so flags after memory
  ops work, peeks only update the last size
- Push 0 on division and modulo by zero
- Fix sign extension, symbolic POPCNT, ROR/ROL/ASR overflows, D2I range,
  half floats in F2D/D2F and NaN handling in the float ops
- Add an esil_ops test with the results of r2 master
2026-11-06 18:56:00 +01:00
pancake 457e673de9 Accept negative register offsets from r2 master
The riz zero register is reported with an offset of -1, which failed
to deserialize as u64 and broke loading the register profile.
2026-11-06 18:56:00 +01:00
pancake 16c8a32ec5 Update and pin all the github actions 2026-11-06 16:21:57 +01:00
pancake 18587bd765 Fix the macOS build 1.2.0 2026-03-26 19:38:07 +01:00
dependabot[bot] 9e905e6999 Bump actions/download-artifact from 4 to 8 2026-03-26 19:34:26 +01:00
dependabot[bot] 25384a8339 Bump actions/upload-artifact from 4 to 7 2026-03-26 19:34:03 +01:00
pancake ecb8fa27d0 Update for r2v 6.1.2 2026-03-26 19:33:18 +01:00
pancake 34b7cd978a Release v1.2.0 v1.2.0 2026-03-26 19:23:56 +01:00
pancake 2cb600aeee Add the CI jobs for Windows and macOS 2026-03-23 11:20:06 +01:00
pancake 93b1cb823e Update r2pipe 0.8 for windows support 2026-03-23 11:20:06 +01:00
pancake 9a67eeefae Import and update boolector to fix the Windows build
* Boolector project it's no longer maintained
* So we just keep a copy with fixes for Windows
2026-03-23 11:20:06 +01:00
pancake b55bce5b8c Add a simple Makefile 2026-03-09 12:51:32 +01:00
pancake 782737bedb Test against tests/hello for portability and speed reasons 2026-02-20 12:54:32 +01:00
Lennard Hofmann 94c15abc0d Fix slow doctest (use 'env' instead of 'ls' for testing) 2026-02-20 12:43:20 +01:00
pancake 9260b1c6ef Fix warnings 2026-02-20 12:42:22 +01:00
Ignacio Sanmillan 89e36656c1 Apply minor refactor in sBPF architecture, and const variable naming for SF and SHADOW registers 2026-02-17 19:48:08 +01:00
Ignacio SanmillanandAbhi 8a6bed7640 Apply suggestion from @AbhiTheModder
Co-authored-by: Abhi <[email protected]>
2026-02-17 19:48:08 +01:00
Ignacio Sanmillan 8b9b9b274d Extract helper for duplicated register creation and fix trailing whitespace 2026-02-17 19:48:08 +01:00
Ignacio Sanmillan 7fde66b567 Extract is_sbpf_arch() helper function
Reduce code duplication by extracting architecture check into a single helper function
2026-02-17 19:48:08 +01:00
Ignacio Sanmillan 5182106dfc Add named constants for sBPF magic numbers
Replace hardcoded values 0xf000, 0xf008, 0xf010, 0x500000000 with descriptive constants
2026-02-17 19:48:08 +01:00
Ignacio Sanmillan 54803971ee Fix zero-extension asymmetry for concrete values in do_equal
Ensure both symbolic and concrete values are properly zero-extended when smaller than register size
2026-02-17 19:48:08 +01:00
Ignacio Sanmillan 1a516108b5 Fix comparison operators for sBPF compatibility
- Revert regular operators (<, <=, >, >=) back to signed (slt, slte, sgt, sgte)
- Change $ operators ($<, $<=, $>, $>=) to unsigned (ult, ulte, ugt, ugte)
- Fix swapped arguments in unsigned less-than operations
- Rename SignedLessThan/etc to UnsignedLessThan/etc
2026-02-17 19:48:08 +01:00
Ignacio Sanmillan b06b4aced3 Add sBPF architecture support to radius2
- Add shadow stack registers (sf, shadow) for sBPF
- Add signed comparison operations ($<, $<=, $>, $>=)
- Fix unsigned vs signed comparisons for BPF instructions
- Add zero-extension for symbolic values in register operations
- Enhance trap handling for sBPF syscalls with ESIL synchronization
- Add memory access validation for sBPF memory model
- Enable strict mode handling for invalid instructions
- Maintain backward compatibility for non-sBPF architectures

These changes enable radius2 to properly support sBPF (Solana BPF) binaries
while maintaining compatibility with existing architectures.
2026-02-17 19:48:08 +01:00
pancake c96abbfb64 Release 1.1.0 v1.1.0 2026-02-17 19:15:50 +01:00
pancake facdadac42 Add initial logo for radius2 2026-02-17 19:04:46 +01:00
dependabot[bot] 5a187dec03 Bump actions/checkout from 4 to 6 2026-02-11 17:46:52 +01:00
pancake 9517632f6a Add dependabot 2026-01-29 13:15:45 +01:00
pancake 2090799d28 Update README to clarify repository maintenance
Added a note about the repository's maintenance and purpose.
2026-01-29 13:05:16 +01:00
pancake 1b114fa1cd Use radare2 from release in the CI 2026-01-29 13:01:00 +01:00
pancake 190be81005 Add CI badge in the readme 2026-01-29 12:42:17 +01:00
Abhi 1cb48bfca8 CI: run for the entire workspace 2026-01-28 20:00:24 +05:30
Abhi 8a2e50b9cf CI 2026-01-28 09:10:32 +01:00
Abhi 6b9727763d minor enhancements 2026-01-27 22:08:18 +00:00
Ignacio Sanmillan d9d65124b6 r2_api: Change type_num, jump, and fail fields from i64 to u64 in Instruction and Function structs 2026-01-26 20:30:57 +01:00
Ignacio Sanmillan 671164fdb9 operations: Refactor ASR and add modern ESIL operation aliases for remaining shift/rotate ops 2026-01-26 19:17:59 +01:00
Ignacio Sanmillan fb022ea9f4 operations: Add support for ASR (Arithmetic Shift Right) ESIL operation 2026-01-26 19:04:00 +01:00
Ignacio Sanmillan f670d4683d r2_api: Fix radare2 JSON deserialization adding an alias for 'addr' field to support current r2 output format 2026-01-26 19:02:33 +01:00
aemmitt-ns 15e1b7915b fix printf args on arm darwin, add assign_sim, other changes a while ago prolly 2024-12-20 00:29:06 -05:00
Lennard Hofmann ff5a0a6a8d examples: add statically-linked (#24)
The example demonstrates how to use libc function emulation, which can
make a huge difference in runtime for a stripped binary that statically
links against glibc. The test binary links against musl for size reasons.

The source code of tests/statically-linked is

    int main(int argc, char **argv) {
        if (strcmp(argv[1], "s3cret_p4s$w0rd"))
            puts("wrong");
    }

It was compiled with `musl-gcc -static -Os -s`.
2024-05-16 13:29:19 -04:00
aemmitt-ns a7897eb5f6 add FORTIFY_SOURCE functions, return break right away, fix strncmp 2024-05-12 19:58:44 -04:00
aemmitt-ns 9ec520c403 check unconstrained PC for breakpoints addrs 2024-03-28 01:59:11 -04:00
aemmitt-ns bf92f442fb dont use arm.v35, add ghidra option, use hashset for merges 2024-01-26 16:36:34 -05:00
aemmitt-ns 6ba439dbec increase version 2024-01-04 23:58:19 -05:00
aemmitt-ns 41bc85efae add many state merging features 2024-01-04 23:51:12 -05:00
aemmitt-ns d7889f4049 simplify automerge 2023-11-19 17:26:31 -05:00