diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e527f8a..42a71752 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: ci env: - R2V: 6.0.6 + R2V: 6.0.7 on: push: diff --git a/assert.h b/assert.h new file mode 100644 index 00000000..7b7b435f --- /dev/null +++ b/assert.h @@ -0,0 +1,6 @@ +#ifndef CUSTOM_ASSERT_H +#define CUSTOM_ASSERT_H 1 + +#define assert(x) if ((x)) {} + +#endif diff --git a/configure b/configure index 6493da41..cc33963f 100755 --- a/configure +++ b/configure @@ -126,12 +126,12 @@ done : ${INSTALL_PROGRAM_STRIP:=${INSTALL} -m 755 -s} : ${INSTALL_MAN:=${INSTALL} -m 444} : ${INSTALL_LIB:=${INSTALL} -m 755 -c} - PKGNAME='r2ghidra' ; VERSION='6.0.6' ; VERSION_MAJOR=6; VERSION_MINOR=0; VERSION_PATCH=6; VERSION_NUMBER=60006; CONTACT_MAIL="pancake@nopcode.org" ; CONTACT_NAME="pancake" ; CONTACT="pancake " ; + PKGNAME='r2ghidra' ; VERSION='6.0.7' ; VERSION_MAJOR=6; VERSION_MINOR=0; VERSION_PATCH=7; VERSION_NUMBER=60007; CONTACT_MAIL="pancake@nopcode.org" ; CONTACT_NAME="pancake" ; CONTACT="pancake " ; } show_usage() { cat <." exit 0 @@ -235,7 +235,7 @@ case $flag in show_version ; ;; -r|--r|--report) echo "PKGNAME: r2ghidra" -echo "VERSION: 6.0.6" +echo "VERSION: 6.0.7" echo "AUTHOR: pancake" echo "EMAIL: pancake@nopcode.org" echo "LANGS: c++" diff --git a/configure.acr b/configure.acr index 71e6d92e..170777fc 100644 --- a/configure.acr +++ b/configure.acr @@ -1,5 +1,5 @@ PKGNAME r2ghidra -VERSION 6.0.6 +VERSION 6.0.7 CONTACT pancake ; pancake@nopcode.org LANG_CXX! diff --git a/meson.build b/meson.build index 2c168d9e..1938feb7 100644 --- a/meson.build +++ b/meson.build @@ -3,10 +3,11 @@ project( ['c', 'cpp'], license : 'LGPL3', meson_version : '>=0.50.1', -version : '6.0.6', +version : '6.0.7', default_options : ['c_std=c11', 'cpp_std=c++14'] ) + r2ghidra_sources = [ 'src/R2Architecture.cpp', 'src/R2LoadImage.cpp', @@ -44,6 +45,7 @@ if cpp.get_id() == 'msvc' add_global_arguments('-D_WINDOWS', language:'cpp') add_global_arguments('-D_WIN32', language:'cpp') add_global_arguments('-DZLIB_WINAPI', language:'cpp') + add_global_arguments('/wd4200', language:'cpp') # Suppress C4200: zero-sized array in struct r2libdir = [ meson.current_source_dir() + '\\radare2\\lib', 'C:\\radare2\\lib' @@ -75,6 +77,8 @@ r_version_h = configure_file( configuration: versionconf ) +add_global_arguments('-DNDEBUG', language: ['c', 'cpp']) + r2ghidra_incdirs = include_directories(incdirs) zlib = dependency('zlib', version : '>=1.2.8', required: false) @@ -118,4 +122,3 @@ r2ghidra_core_plugin = shared_library('core_r2ghidra', install: true, install_dir: r2_plugdir ) - diff --git a/src/R2Architecture.cpp b/src/R2Architecture.cpp index adcc7de7..43fd9ae4 100644 --- a/src/R2Architecture.cpp +++ b/src/R2Architecture.cpp @@ -12,7 +12,6 @@ #include #include -#include using namespace ghidra; diff --git a/src/RCoreMutex.cpp b/src/RCoreMutex.cpp index 49e0dde4..e8ff229b 100644 --- a/src/RCoreMutex.cpp +++ b/src/RCoreMutex.cpp @@ -3,13 +3,13 @@ #include "RCoreMutex.h" #include -#include - RCoreMutex::RCoreMutex(RCore *core) : caffeine_level(1), bed(nullptr), _core(core) { } void RCoreMutex::sleepEnd() { - assert(caffeine_level >= 0); + if (caffeine_level < 0) { + return; + } caffeine_level++; if (caffeine_level == 1) { #if R2_VERSION_NUMBER >= 50909 @@ -29,7 +29,9 @@ void RCoreMutex::sleepEndForce() { } void RCoreMutex::sleepBegin() { - assert (caffeine_level > 0); + if (caffeine_level <= 0) { + return; + } caffeine_level--; if (caffeine_level == 0) { #if R2_VERSION_NUMBER >= 50909