help-libidn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asan testing of IDN


From: Jeffrey Walton
Subject: Re: Asan testing of IDN
Date: Tue, 14 May 2019 01:32:32 -0400

On Tue, May 14, 2019 at 1:00 AM Jeffrey Walton <address@hidden> wrote:
>
> On Tue, May 14, 2019 at 12:32 AM Jeffrey Walton <address@hidden> wrote:
> >
> > Cancel... A reboot fixed it.
>
> My bad... This issue is still present. (I retested on the wrong machine).
>
> I see a difference, but I am not clear why.
>
> First, the successful tests, like Runners 1 and 2, use my
> "-Wl,-R,/var/sanitize/lib64 -Wl,--enable-new-dtags". The runpath can
> be overridden with LD_LIBRARY_PATH.
>
> libtool: link: gcc -g2 -O2 -fsanitize=address -fno-omit-frame-pointer
> -march=native -fPIC -pthread -fsanitize=address -Wl,-R
> -Wl,/var/sanitize/lib64 -Wl,--enable-new-dtags -o test-verify
> test-verify.o -Wl,--no-as-needed  -L/var/sanitize/lib64 libtests.a
> ../../lib/gl/.libs/libgnu.a libtests.a -ldl -lpthread -pthread
> gmake[4]: Leaving directory '/home/build/libidn-1.35/lib/gltests'
> gmake  check-TESTS
> gmake[4]: Entering directory '/home/build/libidn-1.35/lib/gltests'
> gmake[5]: Entering directory '/home/build/libidn-1.35/lib/gltests'
> PASS: test-alloca-opt
> PASS: test-c-ctype
> ...
>
> However, the Gnulib tests fail, and they discard/override my flags and
> use "-Wl,-rpath -Wl,/var/sanitize/lib64":
>
> libtool: link: gcc -g2 -O2 -fsanitize=address -fno-omit-frame-pointer
> -march=native -fPIC -pthread -fsanitize=address -Wl,-R
> -Wl,/var/sanitize/lib64 -Wl,--enable-new-dtags -o tst_tld tst_tld.o
> -Wl,--no-as-needed  -L/var/sanitize/lib64 libutils.a
> ../lib/.libs/libidn.so ../gl/.libs/libgnu.a -ldl -lpthread -pthread
> -Wl,-rpath -Wl,/home/build/libidn-1.35/lib/.libs -Wl,-rpath
> -Wl,/var/sanitize/lib64
> gmake[2]: Leaving directory '/home/build/libidn-1.35/tests'
> gmake  check-TESTS
> gmake[2]: Entering directory '/home/build/libidn-1.35/tests'
> gmake[3]: Entering directory '/home/build/libidn-1.35/tests'
> FAIL: tst_stringprep
> FAIL: tst_punycode
> ...
>
> I think that means the test runner has to find the runtime libraries
> at /var/sanitize/lib64 or FAIL. FAIL because (1) rpaths (ass opposed
> to runpaths) cannot be overridden with LD_LIBRARY_PATH, and (2) the
> libraries are not yet installed.
>
> Does anyone have an idea how to fix this?

Yeah, this definitely is due to the wrong libidn.so being loaded
during the Gnulib tests.

The machine that tested OK:

$ ls /usr/local/lib64/libidn.*
ls: cannot access '/usr/local/lib64/libidn.*': No such file or directory

And the machine that is testing bad:

$ ls /usr/local/lib64/libidn.*
/usr/local/lib64/libidn.a   /usr/local/lib64/libidn.so.12
/usr/local/lib64/libidn.la  /usr/local/lib64/libidn.so.12.6.0
/usr/local/lib64/libidn.so

So it looks like the Gnulib test runner is picking up the libraries in
/usr/local/lib64.

I've tried to use LD_LIBRARY_PATH, but the RPATH (as opposed to
RUNPATH) does not allow the LD_LIBRARY_PATH override.

The next question is, how do I fix it?

Jeff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]