Commit Graph

326 Commits

Author SHA1 Message Date
pancake
472fbbaf13
Implement RReg.clone() ##api 2022-11-10 00:02:58 +01:00
pancake
7652642373
Deprecate r_str_dup() - related to #20959 ##api 2022-11-07 17:31:30 +01:00
pancake
53e908d802
Generalize vector instruction types instead of following intel-specific ##analysis
* MMX -> VEC64
* XMM -> VEC128
* YMM -> VEC256
* ZMM -> VEC512
2022-11-02 14:02:40 +01:00
pancake
9a4fe919c6
Prefer _tostring() instead of _to_string() ##api 2022-10-24 20:59:18 +02:00
pancake
0d3618414a Fix few windows warnings 2022-10-24 17:55:34 +02:00
pancake
c155c502d2
Some safe memleaks related to analysis and registers refcounting ##leaks 2022-10-17 20:55:10 +02:00
pancake
6afbfecf14 Wire-up RArch into RAnalOp ##arch 2022-10-09 11:14:57 +02:00
condret
799b1939d9 Avoid using RArchConfig->big_endian ##refactor 2022-10-03 09:17:33 +02:00
pancake
43f619a8a6
Initial ref-counted RRegItems, needed for threadsafety ##threads 2022-09-26 12:22:35 +02:00
pancake
b705e334f6 Massage more R2_580 pending changes breaking APIs and ABIs 2022-09-16 11:34:19 +02:00
pancake
84a97a57e6 Use more R_LOG in core, bin, debug, io, .. and add more lints 2022-09-06 08:08:24 +02:00
pancake
7a35f03471 More source spacing linting 2022-08-18 14:37:29 +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
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
6b20b82c32
Refactorings in libr/reg (#20349)
* Refactorings in libr/reg

* More

Co-authored-by: pancake <pancake@nopcode.org>
2022-06-23 13:29:57 +02:00
pancake
3a7e1fd515 Revert RRegType.vec commits to keep ABI stable
* 8cf2122ee9.
* dec3122303.
2022-06-08 19:18:50 +02:00
condret
dec3122303 Add R_REG_TYPE_VEC ##anal 2022-06-08 03:33:32 +02:00
pancake
0a322abc4b Support '$' in regprofile offset column ##arch 2022-05-24 11:10:27 +02:00
pancake
6a832aad6c
Use RArchConfig in RReg, Add RReg.hasbits() apis ##anal
* Remove unused variables in RReg struct
* bits and big_endian is checked from archconfig
* hasbits is now accessed via api
* Ensure bits are a valid value
2022-05-17 10:12:42 +02:00
pancake
94c1b6f7cb Fix UB when casting NaN to ut64 in RRegValue 2022-05-08 11:08:31 +02:00
pancake
c8ae21f68f
Only build library archives when -Dblob is provided ##build
* Lowers the amount of objects from 2400 to 1500
2022-03-22 11:59:13 +01:00
aemmitt-ns
8138a5d977
Add R0 and F0 aliases, add register profile for MSP430
* fix arp tests
2022-03-18 15:03:09 +01:00
pancake
4ba0af5d1d Fix meson -Dblob=true builds for static ##windows 2022-03-16 00:48:50 +01:00
Lazula
d507bda91c Remove R_EMPTY and R_EMPTY2 2022-03-13 11:26:10 +01:00
Sergi Àlvarez i Capilla
aef278ee9c Make -Dblob=true statically link all r2 libraries ##build 2022-03-02 11:30:28 +01:00
Sergi Àlvarez i Capilla
46a69a5014 Fix all the latest covs which spotted new findings 2022-02-15 12:05:50 +01:00
pancake
467ca68d48
Save and check the reg arena size when peekpoking (Fix tests_64923) ##crash 2021-11-01 22:38:53 +01:00
Sergi Àlvarez i Capilla
59a9dfb60a Fix uaf crash in aaft (tests_64927) ##crash
Reported by giantbranch of NSFOCUS TIANJI Lab
2021-10-30 14:11:29 +02:00
pancake
e8d4e5cc9f
Fix the windows build regressions 2021-10-19 22:17:47 +02:00
pancake
93f6b4cd3b
Initial work towards supporting mingw32/64 again ##build 2021-10-18 23:58:16 +02:00
pancake
a242ecf943
Add one more RReg wrapper in RAnal for bindings (#18946) 2021-07-28 12:09:23 +02:00
pancake
352630295e
Polish some asserts here and there (#18927) 2021-07-23 09:36:10 +02:00
pancake
3231c0d585 Initial working implementation of =RS 2021-04-11 01:38:25 +02:00
pancake
4bb90e2399 Add =RS directive in reg profiles to define default value ##anal 2021-04-11 01:38:25 +02:00
pancake
fd1484525a
Implement drcq and show it in visual debug/emu ##debug (#18519)
Co-authored-by: pancake <pancake@nopcode.org>
2021-03-31 19:26:19 +02:00
pancake
f07bedfacd
Use proper types in some fields in IO to fix some potential issues 2021-03-04 18:32:59 +01:00
pancake
47358feb6d Improve reg profile parsing and error handling ##anal 2021-03-02 00:08:14 +01:00
Giovanni
5ffe3e4240 Fixing clang flow warnings (#321) ##rizin 2021-01-19 05:37:17 +01:00
eagleoflqj
d7631443b6 Fix s390x test_reg 2021-01-09 12:34:29 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
Riccardo Schirone
741d22ed61
Use -Werror when building in CI (#17781) 2020-10-13 12:42:57 +02:00
pancake
413437e2b6
Move arp gdb into arpg, improve error and parsing + tests ##debug (#17658) 2020-09-16 19:16:24 +02:00
Khairul Azhar Kasmiran
73317d4955
r_reg_get_bytes: Return NULL if there are no bytes in the arena for the given regset type (#17657) 2020-09-16 18:14:43 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
pancake
2ad2744796
Implement arcc command using the new r_reg_profile_to_cc API ##types (#17618) 2020-09-15 00:59:56 +02:00
Khairul Azhar Kasmiran
fe5b80d615
Fix asan r2pipe test by updating libasan and using LD_PRELOAD (#17594)
* Set LD_PRELOAD for unit tests
* Declare failed debug tests as broken if no assertion or Sanitizer in output
* Check for ASAN=1 in cmd_pipe test
* Set asan: true in the GitHubCI matrix
* Fix ttyname-related runtime error
* Upgrade asan build to Ubuntu 20.04
* Quick fix for reg/arena.c runtime error
2020-09-11 18:47:27 +08:00
Anisse Astier
a4c76ff641
Bring merge sort and insertion sort cmp function semantics together (#17473) ##util
Merge sort uses cmp (a, b) < 0 for its first test branch, and insertion
sort cmp (a, b) > 0 ; which means the 0 boundary goes in one case in one
branch, and in the other sort function in the other branch.

It makes it possible to support compare function that return true/false
instead of -1/0/1; although this isn't an acceptable use of
RListComparator, this prevents future bugs from appearing, because this
works with insertion sort, but not merge sort.

The main advantage of this patch is that both sort functions should sort
equal elements the same way. This stability is important for zignatures
for example.
2020-09-09 15:45:34 +02:00
Khairul Kasmiran
730e4b11bc r_reg_get_name_idx: Don't treat empty reg name differently from other invalid reg names 2020-08-28 23:14:09 +08:00
FXTi
bbc1c4ec7e
Add length check to r_reg_get_name_idx() (#17519)
* Update libr/reg/reg.c

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>

* Fix format

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2020-08-25 08:55:15 -05:00
Riccardo Schirone
594b940b7c
Fixes some of the issues in Travis (#17267)
* Do not check with r_return_ if the convention is present

Let's just assume the NULL default in such a case, so that architectures
for which we don't have a defined calling convention can still be
processed somehow by the analysis code. It won't be precise, but it's
better than nothing.

Also add a warning message so users are aware when the calling
convention is not defined.

* Fix oob-read when # is at the end of the cmd string

* Do not set TMPDIR when the new value is the empty string

When TMPDIR is set to empty value, clang+ld behaves in weird ways and
you cannot compile files from within the r2 shell (e.g. when using #!c
or #!cpipe)

* Use meson and add -lasan to pkgconfig files when sanitizer are used
2020-07-16 20:47:30 +08:00