From 412dac3ee4ba790a38a8a127ae947e05afcf6c06 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 25 Feb 2018 15:34:24 +0200 Subject: wrapper: Add asserts --- src/wrapper/wrapper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wrapper') 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"); -- cgit v1.2.3-70-g09d2