From owner-svn-src-all@freebsd.org Wed Jan 20 23:26:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4A0EA8B758; Wed, 20 Jan 2016 23:26:36 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8CD410C3; Wed, 20 Jan 2016 23:26:36 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0KNQZ2W066142; Wed, 20 Jan 2016 23:26:35 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0KNQZwL066141; Wed, 20 Jan 2016 23:26:35 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201601202326.u0KNQZwL066141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Wed, 20 Jan 2016 23:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294470 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2016 23:26:36 -0000 Author: kan Date: Wed Jan 20 23:26:35 2016 New Revision: 294470 URL: https://svnweb.freebsd.org/changeset/base/294470 Log: Fix initlist_add_object invocation parameters. The tail parameter should point to the last object for which dependencies should be processed. In most cases, this is the object itself. Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Jan 20 23:23:08 2016 (r294469) +++ head/libexec/rtld-elf/rtld.c Wed Jan 20 23:26:35 2016 (r294470) @@ -2016,7 +2016,7 @@ initlist_add_neededs(Needed_Entry *neede /* Process the current needed object. */ if (needed->obj != NULL) - initlist_add_objects(needed->obj, globallist_next(needed->obj), list); + initlist_add_objects(needed->obj, needed->obj, list); } /* @@ -2039,7 +2039,7 @@ initlist_add_objects(Obj_Entry *obj, Obj /* Recursively process the successor objects. */ nobj = globallist_next(obj); - if (nobj != NULL && nobj != tail) + if (nobj != NULL && obj != tail) initlist_add_objects(nobj, tail, list); /* Recursively process the needed objects. */ @@ -3140,7 +3140,7 @@ dlopen_object(const char *name, int fd, */ } else { /* Make list of init functions to call. */ - initlist_add_objects(obj, globallist_next(obj), &initlist); + initlist_add_objects(obj, obj, &initlist); } /* * Process all no_delete or global objects here, given