[Bug dynamic-link/22627] New: $ORIGIN in $LD_LIBRARY_PATH is substituted twice

ldv at sourceware dot org sourceware-bugzilla@sourceware.org
Mon Dec 18 00:49:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=22627

            Bug ID: 22627
           Summary: $ORIGIN in $LD_LIBRARY_PATH is substituted twice
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: ldv at sourceware dot org
          Reporter: ldv at sourceware dot org
  Target Milestone: 2.27

Starting with glibc-2.19~432, dynamic string tokens in $LD_LIBRARY_PATH are
substituted twice, as could be seen in the following example:

$ mkdir -p /tmp/'$ORIGIN' && cd /tmp/'$ORIGIN' &&
  echo 'int main(){}' |gcc -xc - &&
  strace -qq -E LD_LIBRARY_PATH='$ORIGIN' -e /open ./a.out
open("/tmp//tmp/$ORIGIN/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
open("/tmp//tmp/$ORIGIN/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/tmp//tmp/$ORIGIN/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such file or directory)
open("/tmp//tmp/$ORIGIN/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such
file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list