changeset 320:85c80b0c021c

- Darwin/macos fix for dlGetLibraryPath() to correctly fail on bogus handles - Changelog updated - readme tweak
author Tassilo Philipp
date Wed, 13 Nov 2019 17:15:43 +0100
parents 993550558ac5
children 72b450cc3be8
files ChangeLog README dynload/dynload_unix.c
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Nov 13 16:13:07 2019 +0100
+++ b/ChangeLog	Wed Nov 13 17:15:43 2019 +0100
@@ -9,7 +9,10 @@
   o added UTF-8 support for pathnames on windows
   o reliability/stability fix for dlGetLibraryPath() on glibc based platforms (avoiding
     internal use of glibc's bad impl of dlinfo() which doesn't do any error checking at all)
+  o Darwin/macos fix for dlGetLibraryPath() to correctly fail on bogus handles (did return
+    paths to random libraries under some circumstances, instead of returning an error)
   o support for dlGetLibraryPath() on glibc platforms with glibc vesions <= 2.3.3
+  o dlGetLibraryPath() now accepts NULL as argument to return path to executable
 doc:
   o more detail in support matrix for bi-endian platforms
 tests:
--- a/README	Wed Nov 13 16:13:07 2019 +0100
+++ b/README	Wed Nov 13 17:15:43 2019 +0100
@@ -115,6 +115,6 @@
 $ make docs
 
 
-Please refer to http://www.dyncall.org, dyncall(3), dyncallback(3), the dyncall
-manual and platform-specific READMEs under doc/ for more information.
+Please refer to http://www.dyncall.org, dyncall(3), dyncallback(3), dynload(3),
+the dyncall manual and platform-specific READMEs under doc/ for more information.
 
--- a/dynload/dynload_unix.c	Wed Nov 13 16:13:07 2019 +0100
+++ b/dynload/dynload_unix.c	Wed Nov 13 17:15:43 2019 +0100
@@ -145,7 +145,7 @@
 
         /* compare handle pointers' high bits (in low 2 bits some flags might */
         /* be stored - should be safe b/c address needs alignment, anyways) */
-        if(((intptr_t)pLib ^ (intptr_t)lib) < 4) {
+        if(((uintptr_t)pLib ^ (uintptr_t)lib) < 4) {
           l = dl_strlen_strcpy(sOut, libPath, bufSize);
           break;
         }