diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-25 15:34:24 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-25 15:34:24 +0200 |
commit | 412dac3ee4ba790a38a8a127ae947e05afcf6c06 (patch) | |
tree | c6523e94404af738085196859822732b76cd25fc | |
parent | fb212eaa87d94f48d65925713b5a5bbf33eebf8b (diff) |
wrapper: Add asserts
-rw-r--r-- | src/wrapper/wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wrapper/wrapper.c b/src/wrapper/wrapper.c index 3acef77..a78026d 100644 --- a/src/wrapper/wrapper.c +++ b/src/wrapper/wrapper.c @@ -36,6 +36,8 @@ static union { static void trace(const char *const symbol) { + assert(symbol); + if (__cxa_demangle.ptr) { // >If output_buffer is not long enough, it is expanded using realloc // Holy fuck gcc what the fuck? Guess we don't use stack then, thanks @@ -57,6 +59,7 @@ trace(const char *const symbol) void* wrapper_create(const char *const symbol, void *function) { + assert(symbol && function); #ifdef WRAPPER_TRACE if (!__cxa_demangle.ptr) __cxa_demangle.ptr = dlsym(RTLD_DEFAULT, "__cxa_demangle"); |