Add exceptions for debugging 87/200687/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 Feb 2019 07:19:31 +0000 (16:19 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 Feb 2019 07:19:31 +0000 (16:19 +0900)
Change-Id: Iad5fccc7f0b8f88347691c6598339fc1e7c52741
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad_loader.c

index 2de8982..ba5e8f7 100644 (file)
@@ -159,8 +159,17 @@ static void __preload_lib(bundle *b)
                return;
 
        for (i = 0; i < len; i++) {
-               handle = dlopen(so_array[i], RTLD_NOW | RTLD_NODELETE);
+               if (!so_array[i]) {
+                       _E("so_array[%d] is nullptr", i);
+                       continue;
+               }
+               if (so_array[i][0] == '\0') {
+                       _E("so_array[%d] is empty string", i);
+                       continue;
+               }
+
                _D("preload %s# - handle : %p", so_array[i], handle);
+               handle = dlopen(so_array[i], RTLD_NOW | RTLD_NODELETE);
                if (!handle) {
                        _E("failed to load: %s, err: %s",
                                so_array[i], dlerror());