272 Commits

Author SHA1 Message Date
pancake
c67925ebad Add .author field in all the RLang plugins ##api 2022-09-14 17:53:13 +02:00
pancake
b6e7292019 Enable linting for trailing tabs ##lint 2022-08-22 23:25:40 +02:00
pancake
785a469a6d else block linting 2022-08-18 18:35:22 +02:00
pancake
52a22ab995 Add lint for \tfree( 2022-08-18 10:27:06 +02:00
Richard Patel
b78855c38d Refactor a few eprintf 'Cannot …' to R_LOG_ERROR 2022-08-01 16:46:46 +02:00
Richard Patel
dcd740dd53
Refactor a few eprintf to R_LOG_ERROR ##refactor 2022-08-01 00:21:21 +02:00
pancake
425f5b248b Fix two memleaks in the vala plugin 2022-07-01 00:13:19 +02:00
pancake
2a4b000c37 Cleanup lang.vala plugin -20LOC, reduce file path limits, fix uaf 2022-06-28 14:07:07 +02:00
pipothebit
fa4dde736c
Fix: pthread_create: Resource temporarily unavailable ##r2pipe
Fix error that appears when running a long session with esil.
https://github.com/radareorg/radare2/issues/20206
2022-06-03 14:00:40 +02:00
pancake
59081755f4 Fix static linkage with bpf and glitch in rlang.p.{go,v} 2022-06-03 10:08:59 +02:00
pancake
c71d232f8b Implement Llj and #!?j for rlang plugin listing ##shell 2022-05-30 21:15:19 +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
pancake
82794237d7
Update sdb and fix some more unused return value warnings 2022-03-22 11:12:43 +01:00
pancake
f8a35da205
Dont use != NULL as its implicit in C, even for bool casts ##refactor
$ find binr libr -name "*.c" -exec sed -i -e 's/ != NULL//g' {} \;
2022-03-15 19:54:04 +01:00
pancake
4bed905d8a
Fix msvc warnings (#19827) 2022-03-15 19:27:34 +01:00
Lazula
d507bda91c Remove R_EMPTY and R_EMPTY2 2022-03-13 11:26:10 +01:00
pancake
63d4172d94
Fix last covs, mainly memleaks and update one test 2022-03-11 13:14:46 +01:00
Sergi Àlvarez i Capilla
aef278ee9c Make -Dblob=true statically link all r2 libraries ##build 2022-03-02 11:30:28 +01:00
pancake
d3d0e8f3ec Mark all globals (or most of them) as TLS variables ##core 2022-01-21 17:04:56 +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
Claudemirovsky
aceedaefea
Fix libr_lang linking issue ##build 2021-12-13 11:24:23 +01:00
pancake
4327d8322f
Bring back the mingw32 builds ##windows
* Massage conflicting function signatures spotted by mingw
* Fix the spp visibility issue
* Enable 32 and 64bit mingw builds in the CI
2021-11-28 22:10:51 +01:00
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
Sergi Àlvarez i Capilla
76a50afce0 Add build failure fortune 2021-10-20 15:22:12 +02:00
pancake
fdde9caaad
Fix builds issues on meson, windows, ios, static and wasi 2021-10-19 20:57:19 +02:00
Sergi Àlvarez i Capilla
77fcda89aa Static build fix 2021-10-19 15:15:01 +02:00
pancake
3548e2e8a4 Final mingw fixes 2021-10-19 12:52:00 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build 2021-06-20 17:14:43 +02:00
pancake
b545c72017
Better handling of HAVE_SYSTEM, PTY, FORK, DYLINK and THREADS ##build 2021-06-10 13:52:29 +02:00
Sergi Àlvarez i Capilla
976b240e8c Ensure the string ownership and fix the leak properly for vlang 2021-06-09 20:21:27 +02:00
Sergi Àlvarez i Capilla
e25c4d6419 Enable the boehm garbage collector when running V scripts 2021-06-09 17:52:14 +02:00
Sergi Àlvarez i Capilla
5887d1ec72 Fix null deref and memleak in lang.v 2021-06-09 17:08:25 +02:00
pancake
b772366dee
Add GO rlang plugin (#18646) ##lang 2021-04-30 20:09:14 +02:00
pancake
e81b3dae06 Add example for the SPP rlang plugin 2021-03-29 21:09:34 +02:00
pancake
0f4bc7191b Add #!*? command to show rlang plugin examples ##lang
* Add examples for C and V
2021-03-29 21:00:45 +02:00
pancake
535ebd2b24 Remove dead code from the vlang plugin 2021-03-18 19:19:42 +01:00
pancake
59ef16fd3b Add support to the V programming language for scripting ##lang
* Code taken back from radare2-rlang
2021-03-18 17:49:33 +01:00
Kamil Rytarowski
9d761f6a88
Avoid array subscript type issues (#18295)
Cast char to unsigned char for standard reasons and security purposes.

Fixes build issues on NetBSD.
2021-01-26 13:08:58 +01:00
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