Commit Graph

2008 Commits

Author SHA1 Message Date
Lazula
2255bf8b5d Many indentation style fixes
* Change several 8-space indents to tabs
* Apply tab indent style when breaking long lines
* Move operators from EOL to start of next line
* Fix ternary formatting
2021-11-18 10:43:52 +01:00
pancake
4c9fac84a0
Generate bin/d the same way as other sdb paths with meson ##build
* Add -Dwasan=true for meson to compile with msvc's address sanitizer
* Clear the prefix dir before installing, so we ensure it's more realistic
2021-11-14 00:57:35 +01:00
pancake
fdde9caaad
Fix builds issues on meson, windows, ios, static and wasi 2021-10-19 20:57:19 +02:00
pancake
3548e2e8a4 Final mingw fixes 2021-10-19 12:52:00 +02:00
pancake
f80ce61ade
Enable R2_DEBUG_ASSERT=1 in r2r ##tests (#19226)
* Fix assert issue in rafind2
2021-10-19 01:15:14 +02:00
Sergi Àlvarez i Capilla
4a6c0c8e84 Fix some asserts spotted by r2r and R2_DEBUG_ASSERT=1 2021-10-14 18:49:33 +02:00
Sergi Àlvarez i Capilla
4a7aa8dbe6 Assume tests without FILE= just open - ##tests 2021-10-14 18:48:17 +02:00
Sergi Àlvarez i Capilla
6969ee42ee Sync swift demangler syntax with Apple one and force trylib=0 in r2r.c 2021-10-05 10:10:32 +02:00
pancake
56a0e2eedb
Show instruction and bytes when failing asm tests ##tests (#19145) 2021-09-28 11:18:47 +02:00
pancake
f0deead6ae Fix mutex regression in r2r 2021-09-19 01:14:41 +02:00
pancake
86472a6b4f
Fail with r2 -p unexistent-project ##projects
Co-authored-by: pancake <pancake@nopcode.org>
2021-09-19 00:16:46 +02:00
pancake
d520902ce8 Add RCons.isWindows() and update mini graph test 2021-09-17 09:24:27 +02:00
pancake
34d5c13776 Fix last covs 2021-09-17 01:59:44 +02:00
ryancaicse
faddc6a3d5 Fix un released lock
Fix un released lock state.lock in the main before the program exits.
2021-09-14 05:08:47 -07:00
ryancaicse
ad48d39666 Fix an unreleased lock in the RThreadFunctionRet
Fix an unreleased lock subprocs_mutex in the RThreadFunctionRet.
2021-09-14 05:08:47 -07:00
Lazula
601f3174ea Force tests to run in UTC timezone and document in testing README ##test 2021-09-08 09:13:30 -07:00
pancake
ef920b9a65
Fix --with-rpath and use it from preconfigure ##build 2021-09-07 22:19:15 +02:00
Sylvain Pelissier
bff04d1ac9
r2pm: Add offline option for installation ##r2pm 2021-08-31 17:09:58 +02:00
pancake
ff2d728a4f Add more global combination flags for r2pm 2021-08-25 14:28:32 +02:00
pancake
1c73f1b101 Portable fixes 2021-08-25 14:15:15 +02:00
pancake
395a6f2e64 Improve portability by defining util deps properly 2021-08-25 13:47:36 +02:00
pancake
885820fccf Cleanup USE_PIE rule for binr 2021-08-23 12:17:16 +02:00
pancake
a604152750 Vinix doesn't support PIE binaries yet 2021-08-20 16:02:39 +02:00
pancake
04483ee801
Initial import of ./preconfigure for packaging purposes ##build
* Use git clone -q for a quieter experience
2021-07-31 02:48:40 +02:00
pancake
5054be3555
Rename rvc2 to ravc2 to follow the ra*2 pattern ##tools (#18938) 2021-07-26 00:05:35 +02:00
pancake
b37c354565 Fully de-assert the codebase. Instead use r_return_if_fail 2021-07-13 01:23:30 +02:00
pancake
46068b1625 More portability build fixes 2021-07-07 20:09:55 +02:00
pancake
daee2a5ab7 Run r2pm update once an hour init/update without user interaction by default
* See R2PM_OFFLINE=1 to disable this new default behaviour
2021-06-30 21:47:35 +02:00
RHL120
6f05d09713
Major rvc api refactor to use sdb ##projects 2021-06-21 08:44:06 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build 2021-06-20 17:14:43 +02:00
pancake
d894f967e8 Add r2pm -U to upgrade all the outdated packages 2021-06-15 12:09:27 +02:00
Sergi Àlvarez i Capilla
56b5b57dcb Fix double unlock regression 2021-06-09 21:11:32 +02:00
pancake
f6b35eec47
Use r_sys_getpid() for source portability whetever getpid() is called (#18809) 2021-06-07 17:32:37 +02:00
Sergi Àlvarez i Capilla
247b509edc Improve monotonic clock checks, fixing build on old linuxes 2021-06-05 11:35:31 +02:00
David CARLIER
adbb324eb0
Fix build of io.ptrace in openbsd (#18774) 2021-05-29 00:16:14 +02:00
pancake
23ad9b50ee
Fix #12335 - ignore system-installed r2 includes ##build 2021-05-28 00:45:48 +02:00
pancake
a4b80d0b25 commandline -> command-line 2021-05-25 10:51:18 +02:00
pancake
14e5afe6cf
Add initial rvc2 command ##shell (#18716) 2021-05-20 03:34:23 +02:00
pancake
9242bc2328 Fix #18699 - fix search hit dumps outside the current block in rafind2 2021-05-16 20:23:57 +02:00
pancake
bc70f322f7
Make r2r pull/clone test/bins if not found instead of the Makefile (#18685)
Co-authored-by: pancake <pancake@nopcode.org>
2021-05-13 02:30:01 +02:00
pancake
03285b4978
Dont check further colon separated directories after the file is loaded (#18680)
Co-authored-by: pancake <pancake@nopcode.org>
2021-05-11 19:39:56 +02:00
pancake
91e69838bc
Fix #17105 - Add r2r -s flag to skip given test by cathegory (#18676) 2021-05-11 13:56:05 +02:00
pancake
efeba1d15b
Fix --with-rpath and add CI tests (#18668) ##build 2021-05-09 19:57:11 +02:00
Anthoine Bourgeois
c88877f990 Remove refs to radare2-shell-parser
This fix the CI build of linux-static.

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
2021-04-24 21:58:09 +02:00
pancake
23b838a0a9
Remove all the travis and codecov reminiscenses (#18585)
* Codecov and Travis scripts were disabled on January
2021-04-16 17:56:50 +02:00
pancake
1e0f8e1841 Move shlr/tcc into libr/parse/c ##build 2021-04-10 00:47:49 +02:00
pancake
6f2fd83b64 Early exit in r2pm -v to avoid double rainbows 2021-03-15 12:37:18 +01:00
pancake
c11cd5c69b
Add R2R_SKIP_ASM env var handling in r2r ##test (#18462) 2021-03-15 01:31:08 +01:00
pancake
3694865726
r2 -b acts like -e asm.bits, which resulted in anal plug issue (#18438) 2021-03-11 20:07:16 +01:00
pancake
4a3479ede3
Dont use large stack buffers and fix overflow in r2r (#18433) 2021-03-10 18:01:07 +01: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
cafdd18c27 Fix #18391 - Show help in r2pm even before initializing the db ##tools 2021-02-28 18:15:48 +01:00
pancake
30ea521f7b Show useful error message in r2blob 2021-02-14 02:41:34 +01:00
pancake
77cf15c2c3 Fixes to make the r2blob shine again ##build 2021-02-14 02:41:34 +01:00
pancake
da7f0310e4 Fixes for sys/static with acr 2021-02-14 02:41:34 +01:00
pancake
054b5fa46a
Add 32bit Debian packaging and bonus CI fixes ##build 2021-02-13 05:09:30 +01:00
pancake
545f9197f1
Fix the archos regression in the CI (#18327) 2021-02-03 12:07:14 +01:00
pancake
ccfea838b9 Fix asan crash and r2r regression 2021-01-31 23:42:19 +01:00
pancake
8cf1adfb27
Fix and comment the broken debugger tests after last gha update (#18317)
* Add R2R_SKIP_ARCHOS env var handling in r2r to fix TCC suite
2021-01-31 23:00:38 +01:00
ChD1
6187be3be6
Fixes in ae command handler and some null derefs (#18307) 2021-01-29 19:49:41 +01:00
Keegan Saunders
590eaa6852
Assign radare2 binr target ##build (#18306)
This way, when radare2 is used as a subproject with cli=enabled, the
radare2 executable can be referenced

Co-authored-by: Keegan Saunders <meme@users.noreply.github.com>
2021-01-28 18:39:50 +01:00
Qijia Liu
1d62d7df13 Fix memleak in db/asm/arm_64 2021-01-14 00:05:56 +01:00
pancake
1184610971
Fix the CI badge and fully rewrite all the workflows to make sense ##build
* Windows, Linux, Static, macOS, Android, iOS builds published for every commit
* Kept coverage, coverity, fuzzing tests, lgtm and -Werror jobs
* Kill the continuos, the over-engineered matrix and other empty or unnecessary tasks (250 vs 900LOC)
* Jobs TODO: fatmac, termux and rpm (centos) packages
2021-01-12 13:41:21 +01:00
liumeo
965f3ed10e Use pj in dmj, dmhj & fix regex r2r ##refactor 2021-01-09 12:35:20 +01:00
yossizap
39bcebdc98 Added support for regex in test output ##test
- pancake has improved the original patch
2021-01-08 04:42:07 +01:00
pancake
e79deb8e1f Remove --without-r2r configure option ##build 2021-01-05 16:04:57 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
GustavoLCR
94b2d83004
Add option to log r2r test results and publish it in the CI (#17964) ##test 2020-11-24 03:43:41 +01:00
Khairul Azhar Kasmiran
9c66a31a97
Add 6 minutes to cmd_aae timeout and skip aaa for swift_read fuzz test (#17805)
* Add 6 minutes to the cmd_aae test
* Skip aaa when doing swift_read fuzz test on asan
* Bump linux-meson-gcc-newshell-tests timeout to 60 minutes
2020-10-27 18:19:01 +08:00
Damien Zammit
2ccd0c0cd2
r2pm: Add R2PM_GITSKIP env var to skip git checkout master && git pull (#17646) 2020-10-17 10:43:46 +02:00
Riccardo Schirone
af337b1439
Prevent multiple threads from opening new files at the same time ##r2r (#17736)
This should fix a nasty issue with r2r, where tests never terminated.
That was caused by the jq process waiting indefinitely for input from
fd0, because the other end of the pipe was never closed.

Indeed r2r_subprocess_start forks and closes known unnecessary opened fd
in the child process, however it does not consider also all the other
file descriptors that could have been created by other threads
simultaneously. As fd are per-process and not per-thread, file
descriptors created by other threads while doing e.g. pipe to spawn a
separate jq process will clutter other threads (and following jq
processes) as well. If two jq processes happen to keep a fd to the other
end of the pipe for the fd0 of the other jq process, none of them
terminates, thus they never close those spurious file descriptors,
causing tests to hang.

This tries to fix the issue by making sure only one thread at a time can
start a subprocess. In this way no other FDs can be created while a
thread is in the middle of r2r_subprocess_start.
2020-09-30 10:40:23 +02:00
Khairul Azhar Kasmiran
0e1fa7c341
Do partial =h test on Windows (without /cmd and using curl) (#17729)
* Properly default http.root on Windows
* Do partial =h test on Windows (without /cmd and using curl)
2020-09-29 21:23:26 +08:00
bazuchan
9d61f554f5
Set R2_* variables by calling r2 -H only once (#17650) ##r2pm 2020-09-18 13:39:05 +02:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +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
Riccardo Schirone
3f4079c4ca
Add support for TIMEOUT key for cmd tests (#17582) ##r2r 2020-09-04 15:17:17 +02:00
Khairul Azhar Kasmiran
7066f58d8c
r2r: Set cmd test to NULL on load failure (#17512) 2020-08-25 18:21:38 +08:00
Khairul Azhar Kasmiran
52668c02d2
r2r: Check whether test has EXPECT or EXPECT_ERR (#17508) 2020-08-24 18:29:37 +08:00
Khairul Azhar Kasmiran
10b2e9a797
r2pm: Remove trailing slash from R2PM_GITDIR (#17482) 2020-08-17 22:34:57 +08:00
Khairul Azhar Kasmiran
5d4680fc01
Ensure cloned pkg dir matches the pkg name (#17472) ##r2pm 2020-08-17 10:53:39 +02:00
pancake
8efd721dba
Fix Cydia/iOS packaging and compilation issues ##build (#17342) 2020-08-14 13:17:32 +08:00
Khairul Azhar Kasmiran
70f88cb361
r2pm: Allow reuse of gitdir-cleaning code in package scripts (#17442) 2020-08-13 22:03:43 +08:00
Florian Märkl
68a1db448d
Merge everything time-related in r_time.h (#17445) 2020-08-12 18:54:49 +02:00
Florian Märkl
8c94f34e90
Add r_sys_now_mono() and use in r2r ##util (#17276) 2020-08-11 20:26:06 +02:00
Khairul Azhar Kasmiran
7ed581d2de
r2pm: Allow package script to declare cleaning is done (#17411) ##tools 2020-08-08 18:37:41 +08:00
Khairul Azhar Kasmiran
613d480d10
r2pm: Don't clone while cleaning (#17406) 2020-08-06 18:37:07 +08:00
Riccardo Schirone
48c30dfd99
Support compilation with meson on old systems like CentOS6/DebianWheezy ##build (#17345)
* Compile tree-sitter and newshell parser with gnu99 if possible ##meson
* Make sure to use `-lrt` when needed to use clock_gettime ##meson
2020-07-27 12:25:06 +08:00
Khairul Azhar Kasmiran
0f0ffee510
r2pm: Support cleaning of package cloned to <package>.git (#17357) 2020-07-27 12:24:16 +08:00
pancake
2c48b60f1d
Fix sys/static.sh after 2d160f2509 (#17336) ##build 2020-07-24 11:55:53 +02:00
pancake
5ef1e7e41c
Fix missing grep glitch in r2pm (#17334)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-23 12:13:43 +08:00
Riccardo Schirone
2d160f2509
Avoid sdb double headers (#17249) ##build
* Avoid duplication of SDB headers in libr/include

SDB is an external project and as such it should live in shlr. However,
for simplicity in dealing with the include flags, the SDB headers were
copied in libr/include as well. This patch just keeps the SDB files
confined in shlr/sdb and make sure various r_* libs use the headers from
there.

* Fix pkgconfig file generation
2020-07-21 10:28:43 +02:00
Khairul Azhar Kasmiran
d970c64292
Move r2r diffchar code into r_util (#17316) 2020-07-20 00:44:27 +08:00
Khairul Azhar Kasmiran
47c774ad0e
r2r: Use Needleman-Wunsch to diffchar (#17248) 2020-07-17 20:58:06 +08:00
Riccardo Schirone
0955b27c9e
Reintroduce --without-r2r configure option (#17294) ##build
This reverts commit 8758fa6b40.
2020-07-17 13:00:14 +02:00
Riccardo Schirone
e3b67f124c
Release pipeline with GitHub Actions (#17192)
* Make sure meson can build with `system` = `android`.
* Add support for binr/blob in meson build
* Create release GitHub Actions workflow
* Add publish-docker-image job
* Also create Ubuntu packages and ship static windows zip
2020-07-09 12:07:45 +08:00
Khairul Azhar Kasmiran
0ff69a5973
Use diff-so-fancy colors in r2r diffs (#17211)
* Use diff-so-fancy colors in r2r diffs
* Define insert/delete colors at top of file
2020-07-06 15:34:03 +08:00
GustavoLCR
25a043e802
Fix r2r crash on Windows if test doesn't have CMDS ##tests (#17181)
* Fix r2r crash on Windows if test doesn't have CMDS
* Throw error on load if test it doesn't have CMDS
2020-07-06 13:50:18 +08:00
Riccardo Schirone
d6c9bd4542
Add support for binr/blob and fix android build ##meson ##build (#17150)
* Make sure meson can build with `system` = `android`.

* Add support for binr/blob in meson build

* Add also r_util as dependency

* Create sdb_version.py to get the SDBVER value from config.mk

* Set unknown sdb version if something fails
2020-07-05 10:53:37 +08:00
pancake
37e10ee7b0
Initial support for git tags in r2pm ##r2pm (#17178)
* Initial support for git tags in r2pm ##r2pm
* Use `r2-` as tag prefix instead of `v`

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-02 11:56:08 +08:00