Add error message if lsan enabled but alloc always feature disabled
Change-Id: I4770838fc8b2b35bf2f23e6e6b4e9712b4bcae80
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
int lsan_open_liblsan()
{
- if (!isOptionEnabled(FL_MEMORY_ALLOC_ALWAYS_PROBING, 0) ||
- !isOptionEnabled(FL_LSAN, 0))
+ if (!isOptionEnabled(FL_LSAN, 0))
return 0;
+ if (!isOptionEnabled(FL_MEMORY_ALLOC_ALWAYS_PROBING, 0)) {
+ PRINTERR("lsan cannot operate "
+ "with disabled alloc always feature");
+ return 0;
+ }
+
liblsan_handle = dlopen(PROBELIB_LSAN, RTLD_NOW);
if (liblsan_handle != NULL) {
lsan_init_succeeded = 1;