[Bug 1780723] Re: Wrong expansion of $PLATFORM by ld.so on 18.04

Hans Joachim Desserud 1780723 at bugs.launchpad.net
Mon Jul 9 09:03:15 UTC 2018


** Tags added: bionic

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1780723

Title:
  Wrong expansion of $PLATFORM by ld.so on 18.04

Status in glibc package in Ubuntu:
  New

Bug description:

  It seems that expansion of the $PLATFORM dynamic linker variable has
  changed between xenial and bionic:

  
  rojer at xenial$ apt-cache policy libc6
  libc6:
    Installed: 2.23-0ubuntu10
    Candidate: 2.23-0ubuntu10
  rojer at xenial$ LD_PRELOAD='/foo/$LIB/$PLATFORM/bar.so' strace -f /bin/true 2>&1 | grep '^open.*foo'
  open("/foo/lib/x86_64-linux-gnu/x86_64/bar.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)


  rojer at bionic$ apt-cache policy libc6
  libc6:
    Installed: 2.27-3ubuntu1
    Candidate: 2.27-3ubuntu1
  rojer at bionic$ LD_PRELOAD='/foo/$LIB/$PLATFORM/bar.so' strace -f /bin/true 2>&1 | grep '^open.*foo'
  openat(AT_FDCWD, "/foo/lib/x86_64-linux-gnu/haswell/bar.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)


  What was `x86_64` before has changed to `haswell` which is way too
  specific and also doesn't match the man page for ld.so which clearly
  states:

         $PLATFORM (or equivalently ${PLATFORM})
                This expands to a string corresponding to the processor type of the host system (e.g., "x86_64").  On some architectures, the Linux kernel doesn't provide a platform string to the dynamic linker.  The value of this  string  is  taken
                from the AT_PLATFORM value in the auxiliary vector (see getauxval(3)).

  
  I verified that `getauxval(AT_PLATFORM)` still returns `x86_64`.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1780723/+subscriptions



More information about the foundations-bugs mailing list