comparison test/dynload_plain/dynload_plain.c @ 311:5b1ff4c73194

- test code fix avoiding sigsegv on some platforms
author Tassilo Philipp
date Sat, 26 Oct 2019 22:02:32 +0200
parents 7c6f19d42b31
children 18de5758980e
comparison
equal deleted inserted replaced
310:2e8be88dad11 311:5b1ff4c73194
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*)1234, queriedPath, 200); 135 bs = dlGetLibraryPath((DLLib*)&r/*dummy addr in own addr space to avoid segv*/, 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 {