From owner-svn-src-head@FreeBSD.ORG Mon Aug 20 23:43:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE0361065670; Mon, 20 Aug 2012 23:43:04 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E18B8FC15; Mon, 20 Aug 2012 23:43:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KNh4Ni015638; Mon, 20 Aug 2012 23:43:04 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KNh4QG015636; Mon, 20 Aug 2012 23:43:04 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201208202343.q7KNh4QG015636@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 20 Aug 2012 23:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239470 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 23:43:04 -0000 Author: kan Date: Mon Aug 20 23:43:03 2012 New Revision: 239470 URL: http://svn.freebsd.org/changeset/base/239470 Log: Do not call process_nodelete with NULL object pointer. The place where the function is called can be reached if object loading and relocation fails too, in which case obj pointer will be NULL. Do not call process_nodelete then, or crash will follow. Pointy hat to: kan Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Aug 20 20:56:40 2012 (r239469) +++ head/libexec/rtld-elf/rtld.c Mon Aug 20 23:43:03 2012 (r239470) @@ -2853,7 +2853,8 @@ dlopen_object(const char *name, int fd, * This has to be done after we have loaded all of the * dependencies, so that we do not miss any. */ - process_nodelete(obj); + if (obj != NULL) + process_nodelete(obj); } else { /* * Bump the reference counts for objects on this DAG. If