Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jan 2022 02:32:36 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   ASAN&UBSAN world in chroot tree, ports built previously, variable results finding /usr/local/lib/*.so* files
Message-ID:  <92820E0F-7733-463D-9383-EBFD0C285E05@yahoo.com>
References:  <92820E0F-7733-463D-9383-EBFD0C285E05.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Note: like the /usr/local/lib/*.so* files, the
wget and git were built previously to the existence
of the ASAN&UBSAN world.

chrooted into the world I built with ASAN and UBSAN:

# ldd `which wget`
/usr/local/bin/wget:
	libintl.so.8 =3D> /usr/local/lib/libintl.so.8 (0x800edc000)
	libunistring.so.2 =3D> /usr/local/lib/libunistring.so.2 =
(0x80182b000)
	libidn2.so.0 =3D> /usr/local/lib/libidn2.so.0 (0x801b76000)
	libssl.so.111 =3D> /usr/lib/libssl.so.111 (0x80229d000)
	libcrypto.so.111 =3D> /lib/libcrypto.so.111 (0x803a00000)
	libdl.so.1 =3D> /usr/lib/libdl.so.1 (0x8034ed000)
	libz.so.6 =3D> /lib/libz.so.6 (0x80585d000)
	libc.so.7 =3D> /lib/libc.so.7 (0x806e00000)
	libthr.so.3 =3D> /lib/libthr.so.3 (0x8063fc000)

# ldd `which git`
/usr/local/bin/git:
	libpcre2-8.so.0 =3D> not found (0)
	libz.so.6 =3D> /lib/libz.so.6 (0x801bc5000)
	libintl.so.8 =3D> not found (0)
	libthr.so.3 =3D> /lib/libthr.so.3 (0x8009ab000)
	libc.so.7 =3D> /lib/libc.so.7 (0x804000000)

Note the differing results for finding libintl.so.8 .

The ldd and which runs get no ASAN reports and no UBSAN reports.

SIDE NOTE
I will note that attempting to use the wget results in:

# wget
ld-elf.so.1: /usr/lib/libssl.so.111: Undefined symbol =
"__asan_option_detect_stack_use_after_return"
END SIDE NOTE


Instead chrooted into my normal world built for chrooting into
main (no ASAN/UBSAN involvement):

% ldd `which wget`
/usr/local/bin/wget:
	libintl.so.8 =3D> /usr/local/lib/libintl.so.8 (0x8022a3000)
	libunistring.so.2 =3D> /usr/local/lib/libunistring.so.2 =
(0x801c69000)
	libidn2.so.0 =3D> /usr/local/lib/libidn2.so.0 (0x803227000)
	libssl.so.111 =3D> /usr/lib/libssl.so.111 (0x80372d000)
	libcrypto.so.111 =3D> /lib/libcrypto.so.111 (0x803a37000)
	libdl.so.1 =3D> /usr/lib/libdl.so.1 (0x805668000)
	libz.so.6 =3D> /lib/libz.so.6 (0x804618000)
	libc.so.7 =3D> /lib/libc.so.7 (0x806aca000)
	libthr.so.3 =3D> /lib/libthr.so.3 (0x80468a000)

% ldd `which git`
/usr/local/bin/git:
	libpcre2-8.so.0 =3D> /usr/local/lib/libpcre2-8.so.0 =
(0x801b2d000)
	libz.so.6 =3D> /lib/libz.so.6 (0x801324000)
	libintl.so.8 =3D> /usr/local/lib/libintl.so.8 (0x801fe8000)
	libthr.so.3 =3D> /lib/libthr.so.3 (0x802ed9000)
	libc.so.7 =3D> /lib/libc.so.7 (0x803d98000)

Note that both libintl.so.8 and libintl.so.8 were found,
as expected. (wget and git both run just fine as well.)


It is the same /usr/local/ file system, used from the two
contexts (mounted into the chroot trees).

It appears that lots of ports from that /usr/local/ tree
get "Shared object not found" messages for one or more
/usr/local/lib/*.so* files (matching up with ldd reports
of not found).

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?92820E0F-7733-463D-9383-EBFD0C285E05>