Module Name:    src
Committed By:   riastradh
Date:           Mon Oct  1 03:03:46 UTC 2012

Modified Files:
        src/libexec/ld.elf_so: rtld.c

Log Message:
On failure in _rtld_dlcheck, call _rtld_error, not xwarnx.

Callers need not call _rtld_error themselves now.

Fixes PR lib/41760.  Should add the test case from the PR too.


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/libexec/ld.elf_so/rtld.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.158 src/libexec/ld.elf_so/rtld.c:1.159
--- src/libexec/ld.elf_so/rtld.c:1.158	Wed Aug 15 03:46:06 2012
+++ src/libexec/ld.elf_so/rtld.c	Mon Oct  1 03:03:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtld.c,v 1.158 2012/08/15 03:46:06 matt Exp $	 */
+/*	$NetBSD: rtld.c,v 1.159 2012/10/01 03:03:46 riastradh Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.158 2012/08/15 03:46:06 matt Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.159 2012/10/01 03:03:46 riastradh Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -775,7 +775,7 @@ _rtld_dlcheck(void *handle)
 			break;
 
 	if (obj == NULL || obj->dl_refcount == 0) {
-		xwarnx("Invalid shared object handle %p", handle);
+		_rtld_error("Invalid shared object handle %p", handle);
 		return NULL;
 	}
 	return obj;
@@ -1335,7 +1335,6 @@ dlinfo(void *handle, int req, void *v)
 		}
 	} else {
 		if ((obj = _rtld_dlcheck(handle)) == NULL) {
-			_rtld_error("Invalid handle");
 			_rtld_shared_exit();
 			return -1;
 		}

Reply via email to