diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9fd45e0..c596637 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,6 +15,18 @@ jobs: runs-on: ubuntu-latest steps: + - name: Check rizin + uses: actions/checkout@master + with: + repository: rizinorg/rizin + ref: refs/heads/dev + path: rizin + - name: Build rizin + run: | + cd rizin + pip install meson + meson setup --debug --buildtype=release --prefix=(realpath $HOME/.local) build + ninja install -C build - uses: actions/checkout@v4 - name: Build run: cargo build --verbose diff --git a/il-tests/src/main.rs b/il-tests/src/main.rs index b167abe..c53bf67 100644 --- a/il-tests/src/main.rs +++ b/il-tests/src/main.rs @@ -47,25 +47,22 @@ impl Display for Instruction { } const INST_LIMIT: usize = 0x8_usize; -const MAX: u32 = u16::MAX as _; +const MAX: u32 = u32::MAX; const ADDRS: [usize; 2] = [0, 0xff00]; fn main() -> Result<(), Box> { let n = MAX / (rayon::current_num_threads() as u32); let map = Arc::new(DashMap::::new()); - let core = Arc::new(Mutex::new({ + let core = Arc::new({ let core = Core::new(); core.set("analysis.arch", "pic").unwrap(); core.set("analysis.cpu", "pic18").unwrap(); core - })); - let runner = |core: Arc>, map: Arc>, x: u32| { + }); + let runner = |core: Arc, map: Arc>, x: u32| { let b: [u8; 4] = x.to_le_bytes(); for addr in ADDRS { - let inst = { - let core = core.lock().unwrap(); - Instruction::from_bytes(&core, &b, addr) - }; + let inst = { Instruction::from_bytes(&core, &b, addr) }; if inst.is_err() { continue; }