Commit graph

29294 commits

Author SHA1 Message Date
Khairul Azhar Kasmiran
4fd556c2a3
Add /rz-pipe to test .gitignore (#4673) 2024-10-17 08:03:53 +08:00
Giovanni
e8aa5100a7
struct timezone is obsolete/deprecated (#4672)
https://man7.org/linux/man-pages/man2/gettimeofday.2.html
2024-10-16 17:13:17 +08:00
z3phyr
b80cdd32e2
Expose APIs for rz-solver (#4648)
* Remove usage of rz_core_cmd_strf
* Expose APIs for rz-solver
* Fix mismatched fn annotation
* Add compound OP for rz-solver
* Add new APIs for compound OPs
* Add new testcases for compound op
* Fix testcases for rop constraint
2024-10-16 16:23:10 +08:00
Giovanni
6cd52783cc
Fix missing declaration of struct timezone. (#4671)
Fixes: ‘struct timezone’ declared inside parameter list will not be
        visible outside of this definition or declaration
2024-10-16 14:53:53 +08:00
Khairul Azhar Kasmiran
1463c1e8b0
Refactor ASAN LD_PRELOAD setup into script (#4670) 2024-10-15 22:49:50 +08:00
billow
2a42a6f8c5
fix: dwarf line op loading (#4669) 2024-10-14 23:44:56 +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
Rot127
08acf54585
RzBuffer consistency and make buffer type public (#4666)
* Make rz_buf_read consistent.

The IO buffer did not updated its seek after reading. Although most of the others do.
The behavior is now documented.

* Partially reverse seek on read for IO_FD and FILE buffers. Because it breaks too many tests.

* Add type when initializing RzBuffer.

* Remove duplicate documentation of RzBuffer read()
2024-10-12 11:27:21 +02:00
Khairul Azhar Kasmiran
5ee08f716b
Redirect stderr to stdout via -1; Unbreak dk 9 test (#4664)
* Redirect stderr to stdout via `-1`; Unbreak `dk 9` test
* Use fully qualified names in 'overgeneral-exceptions' option
2024-10-12 06:37:09 +08:00
Giovanni
b96f355cfe
arch/xap: refactor the code up to rizin standard (#4659)
* Update XAP code to a proper level of decency
* Added test for xap and a bit more refactoring.
* Removed old code
* Updated copyright
* Remove unnecessary includes
2024-10-04 01:45:37 +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
Rot127
09887234c7
Check for jumps to preludes by default. (#4651)
* Check for jumps to preludes by default and follow tail calls.

* Fix test.exe tests. They were text book tail calls.

┌ root.0040103b();
│           0x0040103b      cmp   ecx, dword [0x40d004]
│       ┌─< 0x00401041      jne   0x401045
│       │   0x00401043      repz  ret
└      ┌└─> 0x00401045      jmp   root.00401335

* Add a tail call test for x86

* Document rz_analysis_op_is_eob

* Attempt to remove seemingly irrelevant code.

* Make code more consice.

* Fix and simplify checks for op.type

* OR the TAIL property into the op.type if applicable.

* Fix test: Blocks were incorrectly assigned to function at 0x401000.

* Fix test: Function doesn't access a var at stack - 0x60

* Fix test: The match_suffix() doesn't have a saved prelude.

* Fix test: New name is the actual symbol name.

* Fix tests: Main functions get indeed called via a tail call.

* Fix test: Accept less string found to not increase analysis depth.

Because tail jumps are now correctly marked as end of a function,
they are not always followed deeper with the default analysis depth of 1.
Hence, less strings are found.

* Revert removal of options bound to version.

* Fix tests because they were wrong:

rz_analysis_op_is_eob() did not applied the mask onto op.type,
so it checked against the wrong flags (especially for conditional jumps).
Because the eob check was faulty the execution flow was different.

* Add tail call test for AArch64
2024-09-29 20:19:51 +02:00
Khairul Azhar Kasmiran
3fcfdd5c1c
Declare dk 9 test broken (#4653) 2024-09-27 23:43:10 +08:00
Khairul Azhar Kasmiran
36e4b6a3f6
Spin Linux dk 9 tests (#4650) 2024-09-26 22:52:43 +08:00
Anton Kochkov
612f66e9e1
analysis/function: improve API (#4649) 2024-09-26 22:41:20 +08:00
Rot127
35731483dd
util: implement iterator for hash tables and sets (#4639)
* Implement iterators for hash tables.
* Implement iterator over set.
* Constify get-size() of hash tables.
* Mention iterators in documentation.
2024-09-24 21:36:54 +08:00
wargio
ef8e303710 Run tests on woodpecker but be verbose. 2024-09-23 14:24:41 +08:00
wargio
c147d2e5f7 Fix rz_config_set: variable 'io.sectonly' not found 2024-09-23 14:24:41 +08:00
wargio
c833aaf0f8 Fix rz_config_set: variable 'analysis.jmp.eob' not found 2024-09-23 14:24:41 +08:00
wargio
6d6f8dec6a Fix rz_config_set: variable 'analysis.split' not found 2024-09-23 14:24:41 +08:00
wargio
d66d407b3e Fix rz_config_set: variable 'asm.fcncalls' not found 2024-09-23 14:24:41 +08:00
wargio
ee8935dc86 Fix rz_config_set: variable 'asm.jmphints' not found 2024-09-23 14:24:41 +08:00
wargio
750ad3d500 Fix broken test/db/tools/rz due editor mistake in commit d47ceedbd3 2024-09-23 14:24:41 +08:00
wargio
5896b15354 Add elapsed time when errored or verbose 2024-09-23 14:24:41 +08:00
Khairul Azhar Kasmiran
f6d763c858
Print stderr for failing asm tests (#4646) 2024-09-22 13:33:57 +08:00
Giovanni
d79240ec53
Refactor te.c (#4643) 2024-09-20 20:17:18 +08:00
Khairul Azhar Kasmiran
f2c146a976
subprocess: Provide signal number on signal termination (#4645) 2024-09-20 19:37:27 +08:00
Giovanni
dedf76eebc
test: remove non-existent analysis.noncode option. (#4644) 2024-09-20 18:11:59 +08:00
Giovanni
483b775309
Fix permission of xorencoder.asm (#4642) 2024-09-20 17:04:42 +08:00
Khairul Azhar Kasmiran
9c6d50d46a
Print asm test exit status for failing asm tests (#4640) 2024-09-18 20:20:43 +08:00
Siddharth Mishra
5bfcbbf79f
util/table: new rz_table_add_vrowf to take va_list and add a new row
For cases when we need to directly use arguments of a variadic function
to add a new row to `RzTable`, the new `rz_table_add_vrowf` will take a
`va_list` and a format string to do the same.
2024-09-18 18:08:45 +08:00
Rot127
1d0f7f4217
Add libm as dependency. (#4638)
This fixes 'undefined reference to powf' on Fedora 40.
2024-09-18 16:40:49 +08:00
Giovanni
07a7b0d431
Fix UAF in dwarf-process.c (#4637) 2024-09-18 16:39:41 +08:00
Khairul Azhar Kasmiran
81cad7d52b
Change permissions of some tests to 0644 from 0755 (#4636)
* Change permissions of db/asm/arm_16 to 0644
* Change permissions of db/analysis/thumb to 0644
2024-09-18 13:52:33 +08:00
Tushar Jain
7cb8b3936b
Added linker version to rz-bin -I (#4632) 2024-09-17 15:12:56 +08:00
billow
a13438b232
analysis/dwarf: load sourceline information for global variables (#4635)
* refactor `rz_analysis_var_global_list_show`
* Adding source line information to global variables (DWARF only)
* Add test `global variables list`
2024-09-16 03:26:09 +08:00
Giovanni
db1e4993a0
Replace strdup with rz_str_dup (#4634) 2024-09-15 19:12:07 +08:00
z3phyr
ae644fe03e
Remove instances of rz_core_cmd_strf from tui/rop.c (#4628) 2024-09-15 13:52:45 +08:00
wargio
a29c2c3e7c Run memhungry fuzzed binaries in one thread. 2024-09-13 12:20:39 +08:00
wargio
36fe79ba4a Always check for null when calling calloc in dyldcache.c 2024-09-13 12:20:39 +08:00
wargio
4f394a03a6 Fix out of bound read in analysis_objc.c & update gitignore 2024-09-13 12:20:39 +08:00
wargio
16fa016f45 Harden string limits check in coresymbolication.c 2024-09-13 12:20:39 +08:00
Giovanni
d167921b56
Fix CVE-2022-1207: out of bound read in GNU cris analysis plugin (#4629) 2024-09-12 07:44:23 +08:00
Anton Kochkov
6f0d6750d1 subprojects: rename tree-sitter-c into rizin-grammar-c 2024-09-12 00:41:23 +08:00
Anton Kochkov
26eb2268ca types: fix nested structures format size 2024-09-09 23:44:38 +08:00
Anton Kochkov
8e89297c39 types: add missing atomic integer types 2024-09-09 23:44:38 +08:00
wargio
61de950954 Forbid declaration of __ucrt_int_to_float from Win SDK 10.0.25182.0 2024-09-08 17:34:55 +08:00
wargio
2bd0ae1998 Backport radare2#f7041c2b94d473223f924b251886052fecff3ce1 2024-09-08 17:34:55 +08:00
wargio
435ccc26f4 Improve search of certificates in binary via /cd 2024-09-08 17:34:55 +08:00