[Bug backends/24488] abidw: wrong results when running with ASAN runtim

mark at klomp dot org sourceware-bugzilla@sourceware.org
Fri Apr 26 22:30:00 GMT 2019


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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-04-26
                 CC|mjw at fedoraproject dot org       |mark at klomp dot org
          Component|libdw                       |backends
           Assignee|dodji at redhat dot com            |mark at klomp dot org
     Ever confirmed|0                           |1

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
We discussed this on irc a bit and the real bug is indeed in the sanitizer.
When overriding ldopen it doesn't obey the RUNPATH set in libdw.so. And so 

But on Fedora it still works because ebl_openbackend first tries to load from:

#ifndef LIBEBL_SUBDIR
# define LIBEBL_SUBDIR PACKAGE
#endif
#define ORIGINDIR "$ORIGIN/../$LIB/" LIBEBL_SUBDIR "/"

        /* Give it a try.  At least the machine type matches.  First
           try to load the module.  */
        char dsoname[100];
        strcpy (stpcpy (stpcpy (dsoname, ORIGINDIR "libebl_"),
                        machines[cnt].dsoname),
                ".so");

        void *h = dlopen (dsoname, RTLD_LAZY);

This doesn't work on Debian based systems though.
$LIB will expand to "lib" (on 32bit systems) or "lib64" (on 64bit systems).
But on Debian (amd64) everything is installed under /usr/lib/x86_64-linux-gnu

It is not immediately clear why we use ../$LIB/
I think we can just use #define ORIGINDIR "$ORIGIN/" LIBEBL_SUBDIR "/"

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


More information about the Elfutils-devel mailing list