comparison test/dynload_plain/dynload_plain.c @ 312:18de5758980e

- stability fix: avoid sigsegv in dynload's dlGetLibraryPath() in some cases (e.g. wrong handle given or OS specific quirk)
author Tassilo Philipp
date Tue, 29 Oct 2019 16:09:58 +0100
parents 5b1ff4c73194
children 73b5b9e224e2
comparison
equal deleted inserted replaced
311:5b1ff4c73194 312:18de5758980e
130 printf("failed to query lib path using lib's handle\n"); 130 printf("failed to query lib path using lib's handle\n");
131 131
132 dlFreeLibrary(pLib); 132 dlFreeLibrary(pLib);
133 133
134 /* check if dlGetLibraryPath returns 0 when trying to lookup dummy */ 134 /* check if dlGetLibraryPath returns 0 when trying to lookup dummy */
135 bs = dlGetLibraryPath((DLLib*)&r/*dummy addr in own addr space to avoid segv*/, queriedPath, 200); 135 bs = dlGetLibraryPath((DLLib*)&r/*dummy addr*/, queriedPath, 200);
136 printf("path lookup failed as expected with bad lib handle: %d\n", bs == 0); 136 printf("path lookup failed as expected with bad lib handle: %d\n", bs == 0);
137 r += (bs == 0); 137 r += (bs == 0);
138 138
139 /* test UTF-8 path through dummy library that's created by this test's build */ 139 /* test UTF-8 path through dummy library that's created by this test's build */
140 { 140 {