LSAN: add error message 32/159632/5
authorVitaliy Cherepanov <v.cherepanov@samsung.com>
Fri, 10 Nov 2017 07:42:37 +0000 (10:42 +0300)
committerVitaliy Cherepanov <v.cherepanov@samsung.com>
Thu, 16 Nov 2017 13:24:10 +0000 (16:24 +0300)
Add error message if lsan enabled but alloc always feature disabled

Change-Id: I4770838fc8b2b35bf2f23e6e6b4e9712b4bcae80
Signed-off-by: Vitaliy Cherepanov <v.cherepanov@samsung.com>
helper/lsan_open.c

index 9890548..ba6186e 100644 (file)
@@ -198,10 +198,15 @@ static char *get_report_file_name() {
 
 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;