Commit graph

29138 commits

Author SHA1 Message Date
billow
cae54ff8d9 uleb128: fix sign extend in read_i{32,64}_leb128 2024-03-09 09:41:13 +08:00
pelijah
fd09ff9872
Fix memleak in rz_core_bin_apply_symbols() (#4346) 2024-03-08 16:26:02 +08:00
Huzaifa
2c85412a50
Rz-find -E "filename" to execute command on match (#4200) 2024-03-08 13:49:04 +08:00
wargio
05ab831b9a Fix codeowners and labeler 2024-03-08 12:33:07 +08:00
wargio
5f3af7deee Fix build with capstone v4 and v5 and disable hacks for v6 2024-03-08 12:33:07 +08:00
Giovanni
64f8a5ae57
Move parse into arch. (#4342) 2024-03-07 23:50:22 +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
wargio
d6fc5845aa clang format files that previously were incorrectly excluded. 2024-03-07 18:38:49 +08:00
wargio
d2f0c13fc1 Removed empty files. 2024-03-07 18:38:49 +08:00
wargio
3da17d431f Fix license linter 2024-03-07 18:38:49 +08:00
wargio
d47ceedbd3 Merge rz_asm and rz_analysis into one library but keep deprecated apis.
The tms320c64x has been merged into tms320.
2024-03-07 18:38:49 +08:00
wargio
69c2a4b92d Move librz/analysis int librz/arch 2024-03-07 18:38:49 +08:00
wargio
ec32a8fc75 Move librz/asm int librz/arch 2024-03-07 18:38:49 +08:00
Khairul Azhar Kasmiran
29f9c8a9da
Update tree-sitter to 0.21.0 (#4338) 2024-03-06 20:42:39 +08:00
pelijah
6e81378f85
Fix memleak in rz_bin_string_database_new() (#4336) 2024-03-06 12:10:17 +08:00
Khairul Azhar Kasmiran
d3c05ca730
Use npx instead in rzshell build insns (#4331) 2024-03-05 22:04:47 +08:00
Rot127
de1b126b5d
Disable PCRE2 JIT for Darwin (#4329) 2024-03-05 17:07:07 +08:00
مصطفي محمود كمال الدين
f0643cc1e3
sdb: remove unnecessary insertkeys parameter and dead code (#4328) 2024-03-05 08:28:02 +08:00
Khairul Azhar Kasmiran
4bf58dfb95
Remove rz_core_autocomplete prototype (#4327) 2024-03-04 22:38:25 +08:00
Anton Kochkov
3f7a8d382d type/format: do not read float unless asked to 2024-03-03 20:42:21 +08:00
Anton Kochkov
660146d520 type/format: fix union format generation 2024-03-03 20:42:21 +08:00
Peiwei Hu
b8ddd4df67
Fix the PageUp and PageDown in graph mode in Vv (#4321) 2024-03-03 13:56:11 +08:00
billow
4a0dca6613
java: fix java_class_parse (#4318) 2024-03-03 13:45:48 +08:00
Khairul Azhar Kasmiran
573aee5633
$: Revert code changes in #4293 (#4323) 2024-03-03 13:40:17 +08:00
Rot127
905416f928
Disable usage of wx pages on darvin. (#4311) 2024-03-03 11:39:12 +08:00
Peiwei Hu
33c8299eef
Refine the heuristic rule for encoding detection (#4319) 2024-03-03 08:10:49 +08:00
Peiwei Hu
db7254dd79
Use rz_pvector_join instead of loop (#4320) 2024-03-03 08:09:49 +08:00
Khairul Azhar Kasmiran
299454138b
$: Add rzshell façade (#4314) 2024-03-02 17:11:02 +08:00
Rot127
c2b9208fc2 Unset static flag if system pcre2 lib is used. 2024-03-01 01:14:07 -05:00
Rot127
53235602e4 Fix inlcudes 2024-03-01 01:14:07 -05:00
Khairul Azhar Kasmiran
7cf3a9bbdb
$?: Update to rzshell syntax (#4309) 2024-03-01 00:03:47 +08:00
Peiwei Hu
0fff253fd9
Fold XREFs line more than 3 when in the graph mode (#4308) 2024-02-29 14:28:26 +08:00
Riccardo Schirone
d5eca81256
core: remove plugin from list if init fails (#4300) 2024-02-28 10:18:15 +08:00
Riccardo Schirone
61ee3206f3
core: remove oldshell completion code (#4301) 2024-02-27 20:48:16 +08:00
billow
3b3d57c36c
project: fix global var loading (#4298) 2024-02-27 20:42:23 +08:00
Huzaifa
58f7032f26
Add C API rz_debug_switch_to_first_thread() (#4287) 2024-02-26 21:13:33 +08:00
Peiwei Hu
58808b2756
Remove the deprecated API rz_bin_get_info (#4119) 2024-02-26 00:14:03 +08:00
Peiwei Hu
5d053f0448
Refactor the <entries> in RzBinPlugin from list to pvector (#4118) 2024-02-25 19:42:25 +08:00
Khairul Azhar Kasmiran
8b21371b8d
doc/rzshell: Update w? example (#4295) 2024-02-25 10:34:08 +08:00
Rui Chen
3db7f8b598
docs(PACKAGERS): fix meson option names (#4294)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-02-24 23:18:18 +08:00
Khairul Azhar Kasmiran
b61b951232
$: Fix $alias=$<backtick>cmd<backtick> (#4293) 2024-02-24 13:55:14 +08:00
Anton Kochkov
7225e9b753 Bump version to v0.8.0 2024-02-24 12:09:08 +08:00
Giovanni
78d4043afb
Fix arm64 analysis to fix regression on ARM64 switch tables. (#4284)
* Bump capstone next
* Fix arm64 analysis to fix regression on ARM64 switch tables.
* Fix tests
2024-02-24 00:00:12 +08:00
Rot127
a6c7864198
Fix mismatch 'rz_cons_break_push' and 'rz_cons_break_pop' calls. (#4289)
If a function calls 'rz_cons_break_push()' but never calls 'rz_cons_break_pop()' before return,
the stack count of 'RzConsContext->break_stack' contains too many elements (each time one too much).

This in turn will lead to not resetting 'RzConsContext->breaked' flag.
Because the flag is only set to false, if 'rz_stack_is_empty(context->break_stack) == true'
(in 'rz_cons_context_break_push()').

This wasn't a problem so far, because 'RzConsContext->breaked' is simply never set to true
(exceptions are some timeout cases as far as I can see).
Also these cases when 'rz_cons_break_pop()' was forgetten to be called, were edge error cases.
So not often hit.

But if Rizin is usd by Cutter 'RzConsContext->breaked' is set to 'true',
if an `AnalysisTask` interrupt is handled (in 'AnalysisTask::interrupt()').
This interrupt is triggered for example, when the introduction dialog is closed
and the main Cutter window opens (after the optional 'aaa').

Now, if the binary file was analysed with 'aaa', and a lot of error cases were hit,
those error cases sometimes never called 'rz_cons_break_pop()' before returning from their function.
Although, of course, they should have to the `RzConsContext->break_stack` is in a proper state.

This means, when the main Cutter window opens binary files which trigger many error edge cases,
the `RzConsContext->break_stack` is not empty
(because of the not executed 'rz_cons_break_pop()').

This also means, that the last thing done, was setting 'RzConsContext->breaked = true'
(by 'AnalysisTask::interrupt()').

If Cutter wants to show some disassembly, it calls 'rz_core_print_disasm()' which checks
'RzConsContext == false' via 'rz_cons_is_breaked()'. This condition is never true, because
the flag was not reset to `false` because the stack was never empty.
So it returns before anything was disassembled.

Hence Cutter gets no disassembly text.

Fixes https://github.com/rizinorg/cutter/issues/2552
Fixes https://github.com/rizinorg/cutter/issues/3275
2024-02-23 23:50:11 +08:00
pelijah
7959b4cffb
Fix memleaks related to RzBin::default_hashes (#4286) 2024-02-23 20:20:19 +08:00
Anton Kochkov
f8318bec30
doc: improve man pages (#4288) 2024-02-23 20:13:19 +08:00
Anton Kochkov
9719961b82
analysis: fix capstone 4 and 5 builds (#4283) 2024-02-21 23:47:11 +08:00
Anton Kochkov
e690ea37de
analysis/dwarf: extract register profiles in headers (#4281) 2024-02-21 23:25:16 +08:00
Huzaifa
bde374dad6
Remove Static Variables from RzAnalysis Plugins (#4282) 2024-02-21 23:24:58 +08:00
Florian Märkl
2a9f765582
Weaken f80 assertions in test_float for non-x86 (#4280)
OpenBSD/sparc64 uses 128-bit floats as long double by default while our
tests seeminly assumed either 64-bit or 80-bit, both of which produce
different results than 128 here. Since 80-bit is x86-specific, we check
only the bits we know will be identical between other architectures.
2024-02-21 15:02:05 +01:00