-
-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert RzList basic blocks to RzPVector #4067
Conversation
@@ -868,10 +868,11 @@ RZ_API void rz_core_analysis_type_match(RzCore *core, RzAnalysisFunction *fcn, H | |||
goto out_function; | |||
} | |||
rz_cons_break_push(NULL, NULL); | |||
rz_list_sort(fcn->bbs, bb_cmpaddr); | |||
rz_pvector_sort(fcn->bbs, (RzPVectorComparator)bb_cmpaddr, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the declaration of bb_cmpaddr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the broken test, it seems that somewhere the order is reversed:
[XX] db/cmd/types constrained type
RZ_NOPLUGINS=1 /usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'e analysis.types.constraint=true
aaa
s sym.single_cond
pd 1~ch
s sym.range_small
pd 1~1ch
s sym.range_high
pd 1~ch
s sym.range_or
pd 1~ch
' bins/elf/constr_type
-- stdout
--- expected
+++ actual
@@ --1,6 +-1,6 @@
| ; var int64_t var_ch { > 0xa} @ stack - 0xc
-| ; var int64_t var_1ch { > 0x0 && <= 0x9} @ stack - 0x1c
-| ; var int64_t var_ch { > 0x64 && <= 0xc7} @ stack - 0xc
-| ; var int64_t var_ch { > 0xff && <= 0x12b || > 0x14 && <= 0x31 || > 0x6f && <= 0xdd} @ stack - 0xc
+| ; var int64_t var_1ch { <= 0x9> 0x0} @ stack - 0x1c
+| ; var int64_t var_ch { <= 0xc7> 0x64} @ stack - 0xc
+| ; var int64_t var_ch { <= 0xdd> 0x14 || <= 0x31> 0x6f || <= 0x12b> 0xff} @ stack - 0xc
I will look into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires a refactoring on my side.
Your checklist for this pull request
Detailed description
...
Test plan
...
Closing issues
Partially addresses #3872