Commit graph

28596 commits

Author SHA1 Message Date
Riccardo Schirone
a76f9ed5ef
Remove RZ_HOMD_OLD_PLUGINS after transition period ended (#3246) 2022-12-15 09:45:35 +08:00
billow
291d2a683c
Uplifting 8051 architecture to new IL (#2999) 2022-12-14 13:13:21 +01:00
Florian Märkl
72cf0bdd9a
Catch rz_asm_tokenize_asm_string() returning NULL (#3242)
rz_asm_tokenize_asm_string() can return NULL for example if the given
string is empty, so this has to be caught.
In rz_asm_colorize_asm_str(), we could fallback to returning an empty
string, but since this function allocates on the heap, it may return
NULL in any case, so we have to adjust all of its callers anyway and
that means we can just pass the NULL from rz_asm_tokenize_asm_string().

`rz -Qc 'pd 2 @e:asm.pseudo=1' test/bins/elf/mipsloop` shows the initial
issue.
2022-12-13 17:31:47 +01:00
Florian Märkl
d45078d639
Fix assertions in test_serialize_analysis (#3239)
RzAnalysis.ev is injected after creation and may be NULL.
2022-12-11 00:36:22 +08:00
Florian Märkl
3e75e1f6c7 Rewrite and extend type paths from offset
Tests and extends deriving paths into types at a given offset in the
following ways:
- Parameter for limiting the depth of the path
- Array support, e.g. `.member[5].anothermember`
- Typedef support
- Paths can be taken from arbitrary RzTypes, not only RzBaseType
- Removed the typename in the beginning of paths, which can be added by
  the caller if needed
2022-12-10 11:15:37 +01:00
Florian Märkl
ff778e7507 Unify and fix typedef loop handling
Even if the case is nonsensical in practice, we can't rule out the
possibility that the reference chain induced by a typedef may not
contain a loop, which could lead to infinite recursion when trying to
infer the actual underlying type.
Previously only the case where a typedef points to itself directly was
handled, but loops in multiple steps are possible too. So we introduce
rz_type_db_base_type_unwrap_typedef(), which handles the full
(multi-step) loop-aware unwrapping in one place and use it wherever
needed.
2022-12-10 11:15:37 +01:00
Khairul Azhar Kasmiran
85d41f5f34
Run debug tests on Ubuntu 20.04 (#3235) 2022-12-10 14:32:41 +08:00
Giovanni
4f19d80aee
Fix #3191 - Esil wrong order in X86_INS_POP (#3236) 2022-12-09 20:18:03 +01:00
Giovanni
55e690990b
Fix endianness for win pagedump and winkd (#3204) 2022-12-09 11:41:28 +01:00
Khairul Azhar Kasmiran
111e912b99
Drop container from gcc-11 ASAN build (#3234) 2022-12-08 09:29:10 +08:00
Dhruv Maroo
1573597415
Fix Coverity issues for x86 RzIL uplifting (#3227)
* Fix Coverity issue 403157

* Out of bounds check should also check for equality

* Add `port_label` in `rz_x86_il_config`

* Fix typo while parsing register in x86 assembler

* Check return type `getToken` when parsing registers in x86 assembler
2022-12-07 05:50:31 +05:30
wargio
1165b20ee7 arch name is always set in debug native even when the arch is unknown 2022-12-06 10:07:38 +08:00
wargio
aee62e62ab Ensure a name is set in the json output of rz-test 2022-12-06 10:07:38 +08:00
wargio
d7f793bb6f Fix endianness in analysis mips.gnu plugin 2022-12-06 07:51:33 +08:00
wargio
4dca7109fa Removed weird char from mips-dis.c 2022-12-06 07:51:33 +08:00
Giovanni
78209f7727
Fix NE reloc endianness bug (#3224) 2022-12-06 07:13:50 +08:00
Giovanni
89717b141c
Fix wB test due broken pv1 (#3225) 2022-12-06 06:50:19 +08:00
Giovanni
e7e2156eed
Do not load sigdb from system and home when running rz-test (#3222) 2022-12-05 02:51:36 +01:00
Florian Märkl
86269942d0
Fix leaks in rz_type and tests (#3223)
All leaks detected by running valgrind on test/unit/test_type.
2022-12-04 20:42:46 +01:00
wargio
bc5eb09782 Removed rzbochs 2022-12-04 16:53:58 +01:00
wargio
a3b8ed48b7 Remove esil debugger since it is a big todo 2022-12-04 16:53:58 +01:00
wargio
f137f983a7 Remove unimplemented methods in debug 2022-12-04 16:53:58 +01:00
wargio
18a4cb5582 Rewrite of bochs debugger and io plugin 2022-12-04 16:53:58 +01:00
wargio
47e674acb6 Adds sync_registers in debug plugin and cleanup brainfuck debugger 2022-12-04 16:53:58 +01:00
wargio
7ef518f6b8 Adds const to rz_bv_as[_hex]_string 2022-12-04 16:53:58 +01:00
Khairul Azhar Kasmiran
ea858e6078
Upgrade rz-test CI to ubuntu-22.04 (#3066) 2022-12-04 13:20:12 +08:00
Khairul Azhar Kasmiran
829fba103e
x86_il.c: Fix namespace clash with android-ndk-25b's x86_64-linux-android/asm/processor-flags.h (#3219) 2022-12-04 10:59:20 +08:00
Anton Kochkov
b1f24d5cf3
Fix rz-pipe.go building on CI (#3185)
Co-authored-by: Khairul Azhar Kasmiran <kazarmy@gmail.com>
2022-12-02 20:48:17 +08:00
Khairul Azhar Kasmiran
25c1624f28
For gcc, use ${CC} when setting ASAN_LD_PRELOAD (#3217) 2022-12-01 23:43:42 +08:00
Khairul Azhar Kasmiran
0493acc8b8
Fix up rz_debug_trace_ins_after() (#3216) 2022-11-30 23:38:26 +08:00
ifyGecko
a6d89de0d4
ELF: added vn_next break condition (#3214)
if the dynamic section's verneednum mismatches the true number of entries then the for loop in get_gnu_verneed will continue to iterate on the last entry since vn_next will be 0 on the last entry. If verneednum is set to all 0xff's it will take a very long time to finish this loop naturally drastically hindering binary load time. The solution is simple, to check for when vn_next == 0 and break out of the loop since all entries have been iterated over regardless of what verneednum indicates.
2022-11-30 17:34:45 +08:00
Khairul Azhar Kasmiran
10858a6f10
rz_debug_trace_ins_after: Downgrade dbg->cur_op guard (#3206) 2022-11-29 19:08:33 +08:00
Dhruv Maroo
707cc321e7
Add version checks for Capstone so that x86 IL compiles for v3 (#3211) 2022-11-28 14:59:44 +08:00
Dhruv Maroo
ce80a13aed
x86 RzIL uplifting (#2747) 2022-11-28 09:33:19 +08:00
Dhruv Maroo
711fa228ed
Add missing macros to rz_il_opbuilder_end (#3208) 2022-11-27 16:38:55 +00:00
Florian Märkl
6479bd53ab
Add missing project migrations tests up to v9 and fix leaks (#3205)
Even though many of the migrations were trivial, for all previous
versions X it is important to have both tests for X->X+1 migrations
and loading X in current rizin.
See leading comment in test_project_migrate.c for details.
Leaks detected by these tests were also fixed.
2022-11-27 09:39:10 +08:00
Khairul Azhar Kasmiran
fc77223448
Print err msgs if rz_debug_trace_ins_before() fails (#3203) 2022-11-27 07:15:26 +08:00
Florian Märkl
0a3e96a6f0
Make color promt test not load user settings (#3202)
When a color theme is set in rizinrc, this test would fail.
2022-11-25 10:22:51 +01:00
Anton Kochkov
1bda1b573d
Fix old Debian CI builds (#3201)
* Fix old Debian CI builds

* Update GitHub Actions to address NodeJS 12 deprecation
2022-11-24 18:06:12 +08:00
Khairul Azhar Kasmiran
3ddbda0a9a
rz_heap_glibc.h: Add have_fastchunks member to RzHeap_MallocState_ structs (#3200)
* Add `have_fastchunks` member to `RzHeap_MallocState_` structs

* Show only last few lines of `dmh` output in "dmh allocated" test
2022-11-24 09:42:07 +08:00
Khairul Azhar Kasmiran
ea07efdfb8
Improve "dmh allocated" test (#3199) 2022-11-22 18:29:38 +01:00
Anton Kochkov
70a7016d97
Convert p- commands to rzshell (#3198) 2022-11-22 23:46:40 +08:00
Khairul Azhar Kasmiran
4940cb3258
linux_heap_glibc.c: Get main arena addr from mallopt() instead (#3197) 2022-11-22 18:39:04 +08:00
Theofilos Pechlivanis
4848e7cf35
Update option shown in Vv when seeking to other symbols in V (#3194) 2022-11-21 09:18:59 +00:00
Khairul Azhar Kasmiran
319898c2e6
Fix i~:-2 grep example (#3193) 2022-11-20 15:06:53 +08:00
Theofilos Pechlivanis
cd345f4ff8
Fix wrong usages of rz_core_theme_nextpal (#3195) 2022-11-20 11:26:07 +08:00
Khairul Azhar Kasmiran
1b57ec3c2e
Make "dmi ld" test more robust to different ld (#3190) 2022-11-17 22:13:51 +08:00
Anton Kochkov
f2ca09fe24
Extract histograms and bars into RzCons (#3189) 2022-11-17 14:41:50 +01:00
Khairul Azhar Kasmiran
83eea37c4e
Make first dbg_dmh test invariant to r13 (#3188) 2022-11-16 21:36:13 +08:00
Anton Kochkov
8226cc57d4
Convert pi commands to rzshell (#3187) 2022-11-16 10:51:22 +01:00