The libasan has crypt symbol, so almost all library only links
libasan even it uses libcrypt crypt symbol. This causes segment
fault of accessing 0x00 pc when calling libcrypt functions.
To avoid the issue, add libcrypt to ld.so.preload of asan
environment.
Change-Id: I2ac2b5c34917a120996a651ce5e2f8ccc6ea1a6b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
# Add /usr/lib/libasan.so to /etc/ld.so.preload
[ -f /etc/ld.so.preload ] && mv -v /etc/ld.so.preload /etc/ld.so.preload.orig
echo "%{_libdir}/libasan.so" > /etc/ld.so.preload
+echo "%{_libdir}/libcrypt-2.30.so" >> /etc/ld.so.preload
[ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload
%preun -n asan-build-env