From d17a7354c43cae5bee938f191d58489e2ce2fe6c Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Mon, 30 May 2022 10:54:34 +0900 Subject: [PATCH] packaging: Add libcrypt to ld.so.preload for asan environment 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 --- packaging/gcc-contrib.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/gcc-contrib.spec b/packaging/gcc-contrib.spec index b854aa9..fa326e4 100644 --- a/packaging/gcc-contrib.spec +++ b/packaging/gcc-contrib.spec @@ -360,6 +360,7 @@ Asan build environment # 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 -- 2.7.4