From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 13 18:00:16 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE401106564A for ; Thu, 13 Sep 2012 18:00:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B2D6F8FC14 for ; Thu, 13 Sep 2012 18:00:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8DI0Ghd018319 for ; Thu, 13 Sep 2012 18:00:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8DI0G6Z018306; Thu, 13 Sep 2012 18:00:16 GMT (envelope-from gnats) Date: Thu, 13 Sep 2012 18:00:16 GMT Message-Id: <201209131800.q8DI0G6Z018306@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Mark Johnston Cc: Subject: Re: bin/171604: LD_PRELOAD set to not absolute path crashes rtld X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mark Johnston List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 18:00:17 -0000 The following reply was made to PR bin/171604; it has been noted by GNATS. From: Mark Johnston To: bug-followup@FreeBSD.org, simon@comsys.ntu-kpi.kiev.ua Cc: Subject: Re: bin/171604: LD_PRELOAD set to not absolute path crashes rtld Date: Thu, 13 Sep 2012 13:52:55 -0400 --tVmo9FyGdCe4F4YN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Andrey, Could you give the attached patch a try? Thanks, -Mark --tVmo9FyGdCe4F4YN Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="rtld_crash.patch" diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 050adbb..7272eea 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -1471,8 +1471,9 @@ find_library(const char *xname, const Obj_Entry *refobj) (pathname = search_library_path(name, ld_library_path)) != NULL || (objgiven && (pathname = search_library_path(name, refobj->runpath)) != NULL) || + (objgiven && (pathname = search_library_path(name, gethints(refobj->z_nodeflib))) - != NULL || + != NULL) || (objgiven && !refobj->z_nodeflib && (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)) return (pathname); --tVmo9FyGdCe4F4YN--