Commit Graph

234 Commits

Author SHA1 Message Date
pancake
2be5ff8762
Use r_core_cmd_str_pipe when using . in a panels (#17982) ##visual 2020-12-16 14:25:36 +01: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
Khairul Azhar Kasmiran
8fb7c484da
Windows #!pipe: Remove busy-wait on PeekNamedPipe() (#17344) 2020-07-29 09:35:01 +08:00
pancake
d441baad62
Fix latest COVs, remove dead code and unnecessary global variables (#17231)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-22 19:37:31 +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
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
Riccardo Schirone
7ee93fb457
Fix rlang scripts and cpipe when non standard paths are used ##lang (#17198)
* Get RLangPlugin by name, not by extension
* Directly pass PKG_CONFIG_PATH and set LD_LIBRARY_PATH on cpipe
* Add tests for `#!`
* Move tests to archos tests and do not compile c/cpipe on non-unix
* Escape also in c RLangPlugin
* Use `#pragma message` on windows
* Do not include C/cpipe RLangPlugins on windows
* Also the C plugin is not ready to be used on windows
2020-07-10 13:41:58 +08:00
pancake
13e1636d97
Implement RLang.spp for templated scripting ##lang (#17067)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 14:14:18 +02:00
pancake
5dc86c50c0
Move #!v out of core (it's now available via r2pm) ##lang (#16997)
* RLang.V support moved to radare2-extras ##lang

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 09:32:09 +08:00
Khairul Azhar Kasmiran
896ba91e1e
#!pipe: Fix stray command output on Windows and add r2pipe.py test (#17156) 2020-06-30 17:41:39 +08:00
Khairul Azhar Kasmiran
4acc6de82e
Fix Windows #!pipe (#17139)
* Fix Windows #!pipe
* Fix for case where #!pipe target is not r2pipe-aware
2020-06-24 19:42:58 -05:00
pancake
bd9a604a87
Check for return values in about ~50 method calls (#17025) 2020-06-15 11:24:43 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
Florian Märkl
0b5e78e923
Make size arg of r_file_slurp() size_t (#16221) 2020-03-15 23:34:38 +01:00
pancake
8f799eb9bd Update support for V in libr/lang ##lang 2020-03-10 12:26:05 +01:00
Paul I
0e62dda341
Fix fgets() usage (#16068) 2020-02-29 20:47:10 +01:00
Anton Kochkov
b4de5c5113 Some more coverity fixes (#15802) 2020-01-14 12:57:34 +01:00
Anton Kochkov
0c46c3e1e3 Some coverity fixes 2020-01-08 14:16:11 +01:00
GustavoLCR
07b5e062f2 Fix #15545 - Fix NULL derefs after r_file_slurp() fails 2019-12-15 23:38:38 +01:00
GustavoLCR
2a7025208a Print child output in pipe lang plugin ##windows (#15240) 2019-10-10 04:42:32 +02:00
pancake
a6ee807058 Fix vlang plugin to run scripts and add example ##script 2019-10-01 01:44:17 +02:00
pancake
89e6362a4e Add support for the V programming language ##core 2019-09-30 18:51:29 +02:00
Paul I
78f2b12d0b Fix potential memleaks (#15057) 2019-09-17 02:14:32 +02:00
radare
e1cf65332a
Use r_sandbox_fopen instead of fopen (#14832) 2019-08-18 17:19:53 +02:00
pancake
058088bba8 Enlarge RLang.cmd() to 8KB length commands ##r2pipe 2019-07-10 14:02:15 +02:00
radare
4dbe1453f5
Initial cleanup in RParse, delete mreplace plugin ##disasm
* Also voidify and boolify anal, parse, cons, bin, ..
2019-06-17 02:23:58 +02:00
Florian Märkl
fcf1038f98 Add r_sys_exit to proper quit ##core 2019-06-02 11:28:17 -04:00
Khairul Azhar Kasmiran
8d2b16d74f r_str_prefix() -> r_str_prepend() (#14048) 2019-05-13 16:16:13 +02:00
GustavoLCR
9e9eac5171 Fix lang_pipe_run hang in Windows (#13960)
* Fix lang pipe hang in Windows
* Fix hang and double-free
2019-05-05 11:11:58 +02:00
GustavoLCR
3fba693b91 Add support for UTF console input in Windows (#13338) ##windows
* Add support for UTF console input in Windows
* Convert ANSI input to UTF-8
* Convert UTF-8 to acp when calling ANSI version of functions
* Determine if Windows console output is UTF-8 on the fly
2019-03-18 16:05:38 +08:00
lzutao
1365948cee Do not use reversed keyword of meson ##build
`files` is a reversed keyword in meson. Try to avoid using it.
2019-01-10 14:15:50 +01:00
radare
32e494a696
Improve rap:// code, r2p_ is now r2pipe_ ##io (#12699) 2019-01-09 02:47:35 +01:00
Paul I
b2c7f7ef6c Some fixes (#12670) 2019-01-07 00:29:23 +01:00
lzutao
9cc6d2d291 meson: Do not use glob with meson ##build
* meson: Explicit is better than implicit
* meson: Fix deprecated warnings in Meson 0.49.0
* meson: Do not need separate array for installed files

libr/socket/meson.build:30: DEPRECATION: Library r_socket was passed to
the "libraries" keyword argument of a previous call to generate() method
instead of first positional argument. Adding r_socket to "Requires" field,
but this is a deprecated behaviour that will change in a future version
of Meson. Please report the issue if this warning cannot be avoided in
your case.
2018-12-27 14:17:54 +01:00
David CARLIER
fd93e26d0e Fixes #12531 proposals (#12536) 2018-12-22 10:01:03 +01:00
dav1901
303a57bb85 Minor code cleanups/fixes (#12519) 2018-12-20 11:50:29 +01:00
dav1901
a6b44e03fe Fix warnings (#12309) 2018-11-25 01:46:57 +01:00
dav1901
ef42e5a205 Fix few more covs (#12303) 2018-11-23 20:50:23 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
Riccardo Schirone
d6aab51c2b WIP: gcc8 warnings (#11795)
* arch/ebc: fix style and remove gcc8 warnings
* parse/parse_ppc_pseudo: fix gcc8 warnings
* parse/parse_mips_pseudo: fix gcc8 warnings
* anal/esil: fix strncat usage
* shlr/tcc: fix snprintf usage
* parse/parse_dalvik_pseudo: fix sprintf -> snprintf
* lang/vala: fix gcc8 warnings
* core/vmenus: fix snprintf usage
2018-10-12 12:17:29 +02:00
Florian Märkl
1ed251b894 Make pipe lang plugin sleep while waiting for pipe (#11622) 2018-09-22 20:11:24 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Riccardo Schirone
eee1385466
Meson private (#11331)
* meson: refactor library cflags
* meson: use visibility=hidden by default
* remove unused var
* magic/meson: replace tabs with spaces
2018-09-03 10:07:28 +02:00
Florian Märkl
caf18865df Use waitpid with WNOHANG in lang_pipe_run() (#11278) 2018-08-28 10:35:50 +02:00
Fangrui Song
594a438741 meson: don't compile inclusion-only .c files (#10928) 2018-08-05 17:32:05 +02:00
Riccardo Schirone
7572f315ea
meson improvements (#10617)
* meson.build: fix meson build when not on git
* meson.build: make capstone a dependency
* meson.build: make r_magic library optional
* meson.build: capstone include is already in the dependency
* meson.build: use dependencies instead of manual linking + includes
* meson.build: add travis
* flag/meson.build: include sdb dependency
* travis-script: print messages based on install system
* io/meson.build: add sdb as dependency
* syscall/meson.build: missing sdb dependency
* {parse,config}/meson.build: add sdb dependency
* travis.yml: pass INSTALL_SYSTEM var to docker
* {bin/shlr}/meson.build: add sdb_dep to r2java and bin
* install meson and ninja-build in r2-travis docker
* travis.yml: allow meson build to fail for now
* anal/meson.build: add sdb and java dependencies
* egg/meson.build: add sdb dependency
* travis.yml: meson build env should be also in the includes list
* core/meson.build: add java dep
* meson.build: use dependencies also to create main r2 dependency
* rasm2/meson.build: replace link_with with dependencies
* rasm2/meson.build: add sdb as dependency
* meson.builds: convert link_with to dependencies and fix tabs
* travis-script: change meson install prefix and set PKG_CONFIG_PATH
* travis-script: add lib64 to LD_LIBRARY_PATH
2018-07-09 16:58:38 +02:00
pancake
91a2e5fb9d More killing of strcasecmp/strncasecmp 2018-05-21 22:13:07 +02:00
pancake
9bcae5a9d2 Fix last covs 2018-05-21 22:13:07 +02:00