287 Commits

Author SHA1 Message Date
pancake
c15ace8508 Initial support for D calling convention ##analysis
* Only for x86-32 for now
* Uses a reverse register list for passing arguments
* See libr/anal/d/README.md for more details
* Support ret2 (to return 64bit values)
* Add fcn->realname for demangled names
2023-08-25 20:00:33 +02:00
Luc Tielen
d4955f0cff Massage the code to make tests pass 2023-08-15 12:44:57 +02:00
pancake
5988e00f83 Add ec func_var_name in the color palette ##cons
* Use it in disasm.c and update all the themes
2023-07-07 00:36:49 +02:00
Luc Tielen
5fda141d1d Migrate arm_cs plugin ##arch 2023-06-16 22:23:09 +02:00
pancake
359d080b50 Optimize anal.roregs ##analysis 2023-06-14 21:22:32 +02:00
pancake
f40ce7e9e6
RAnalValue no longer refs an RRegItem ##analysis
* Highly reduce memory usage, faster analysis and fix some memleaks and uafs
2023-06-09 12:05:43 +02:00
pancake
93e3c53d55 Fix null deref in arm32 calling conventions via 'aaef' ##analysis 2023-05-03 19:05:03 +02:00
pancake
41a9cea596
Handle RArch.getRegProfile() from RAnal.setRegProfile ##arch 2023-04-25 19:00:48 +02:00
pancake
872e02dff9
Branch prediction optimizations (3/3) ##performance 2023-04-18 17:48:13 +02:00
pancake
396861400d Support function arguments without a name ##anal
* Default name is 'arg%d'
* Warnings moved to the right place
* Fix null assert related to this
2023-03-09 14:12:59 +01:00
Lazula
22d71f931a Remove RList.get_top and RList.get_bottom 2023-03-03 10:14:51 +01:00
pancake
df1529933e Proper fix for the previous null derefs, reducing indirections 2023-02-15 16:12:57 +00:00
pancake
699f9d8651 Add lint for ==' to improve code readability 2023-01-16 13:43:38 +01:00
pancake
05947def03
Move the preincrement and void arg from tests to lint.sh ##syntax
* The regex was not correct, so it was missing a lot of cases
2022-11-30 17:13:32 +01:00
pancake
6ca9edb1ce Fix warning in aflj when parsing vargarg signatures ##anal 2022-11-17 21:23:32 +01:00
pancake
e9b710249f
Rename RVector.len to RVector.length for consistency ##api 2022-11-06 19:48:53 +01:00
pancake
700a200764 Fix last leaks from coverity 2022-10-21 11:35:55 +02:00
pancake
38c0c394a5 Fix tj ttj tfj outputs ##json 2022-10-20 06:48:59 +02:00
pancake
c155c502d2
Some safe memleaks related to analysis and registers refcounting ##leaks 2022-10-17 20:55:10 +02:00
pancake
9d5f2a928c Use the new RVector.at() to make safe RAnalOp.srcs,dsts accesses 2022-10-17 01:14:56 +02:00
pancake
36a63c3400 RAnalOp.srcs,dsts are not pointers ##abi 2022-10-17 01:14:56 +02:00
pancake
8693784eff Strictier rules for var parsing to shorten some execution paths 2022-10-16 21:03:26 +02:00
pancake
95eff67851
Enable the leading spaces linter rule and fix them all ##lint 2022-09-24 03:43:21 +02:00
pancake
b544f7ec1c Cache r_anal_cc_arg in heap to avoid ownership race conditions 2022-09-23 22:07:49 +02:00
pancake
9e53795891 Add some RThreadLocks and start to use the critical sections ##threads 2022-09-23 22:07:49 +02:00
HighW4y2H3ll
15d337a70a Use RPVector in RAnalOp src/dst to support ldm/stm/simd ##anal 2022-09-18 10:01:39 +02:00
pancake
8317a962e1
Add anal.vars.newstack - configurable improved stack-relative var ##analysis 2022-09-14 00:18:38 +02:00
pancake
b6e7292019 Enable linting for trailing tabs ##lint 2022-08-22 23:25:40 +02:00
pancake
7a35f03471 More source spacing linting 2022-08-18 14:37:29 +02:00
pancake
8c66266e99 Lint for trailing spaces 2022-08-15 18:21:18 +02:00
pancake
332574aeb5
More eprintf -> RLOG here and there ##refactor 2022-07-05 13:34:13 +02:00
pancake
e2bbe2b14e
Add a linting to avoid R_LOG calls ending with a dot ##lint 2022-07-04 17:42:25 +02:00
pancake
3db3750eb0
Lint for x"" ##cleanup 2022-06-28 12:07:58 +02:00
Richard Patel
363df75c06
Replace some instances of eprintf with R_LOG_ 2022-06-28 02:49:42 +02:00
pancake
2bca764ad3 Cleanup stuff
* Use more R_TH_LOCAL
* Use more const char * const
* Add archinfo for cr16
* Use more R_LOG
* Remove dup code in RCons.pixel
2022-06-26 12:41:22 +02:00
pancake
5b7c970f2b eprintf requires newline
* git grep eprintf | grep -v '\\n'| grep '('
2022-05-05 13:11:52 +02:00
pancake
560f7fb424 Introduce r_arch.h. Use RArchConfig in RAnal and improve RRef api ##api
* Fix unaligned issue in hex asan test
2022-04-24 23:11:26 +02:00
pancake
a45ad575b1 Update material webui with latest tweaks 2022-04-20 00:27:17 +02:00
pancake
3b3b83637e Fix #19876 - Smarter local variable and argument sorting ##disasm
* Fix tests
2022-04-18 23:47:18 +02:00
pancake
9386d87f1a Fix comma separated args in r_anal_function_format_sig ##analysis
* This is used by `pd`
2022-04-18 23:47:18 +02:00
pancake
a7ce29647f Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
  can result on UAF again, to properly protect r2 from crashing we
  need to break the ABI and add refcounting to RRegItem, which can't
  happen in 5.6.x because of abi-compat rules
2022-03-21 18:46:53 +01:00
pancake
ad2df6a14c Fix undefined behaviour in RVector, RPVector, RInterval and container_of ##fix
* All those basic primites were based on wrong assumptions
* Added more return_if preconditions on several anal functions
2022-03-21 12:04:14 +01:00
pancake
63d4172d94
Fix last covs, mainly memleaks and update one test 2022-03-11 13:14:46 +01:00
pancake
b2cb721bf0
Restrict local vars and args in a 8KB range, otherwise skip ##analysis (#19811)
* Update and verify tests accordingly, new output is better
* Optimize function emulation by reusing bbdata
2022-03-10 16:45:59 +01:00
pancake
5cc0becdcd
Macrofication of the '+=' and '-=' esil operations ##esil 2022-02-01 13:34:34 +01:00
pancake
917527306f
Address latest covs and remove some %zu format warnings (#19647) 2022-02-01 08:19:38 +01:00
Dennis Goodlett
249222cfe7 Simpler var counting API ##analysis 2022-01-31 01:46:54 +01:00
RHL120
785e500a7e
A better way to check if a project has been saved ##projects
* Add a dirty var to RFlag, RAnal and RConfig
* Add  prj.alwaysprompt
* Add R_DIRTY() and R_IS_DIRTY()
2022-01-25 10:39:15 +01:00
pancake
f2995c2949
Introduce r_strf and stop using sdb_fmt ##util 2022-01-18 18:35:31 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00