Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common Distinguish between a corrupt obj pointer and...



details:   https://anonhg.NetBSD.org/src/rev/10d508fe6b2e
branches:  trunk
changeset: 761798:10d508fe6b2e
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Feb 08 02:03:13 2011 +0000

description:
Distinguish between a corrupt obj pointer and a null obj pointer.

diffstat:

 lib/csu/common/crt0-common.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 4b274d55b0c5 -r 10d508fe6b2e lib/csu/common/crt0-common.c
--- a/lib/csu/common/crt0-common.c      Tue Feb 08 02:02:25 2011 +0000
+++ b/lib/csu/common/crt0-common.c      Tue Feb 08 02:03:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0-common.c,v 1.1 2010/08/07 18:01:33 joerg Exp $ */
+/* $NetBSD: crt0-common.c,v 1.2 2011/02/08 02:03:13 matt Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: crt0-common.c,v 1.1 2010/08/07 18:01:33 joerg Exp $");
+__RCSID("$NetBSD: crt0-common.c,v 1.2 2011/02/08 02:03:13 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/syscall.h>
@@ -105,7 +105,9 @@
                __ps_strings = ps_strings;
 
        if (&_DYNAMIC != NULL) {
-               if ((obj == NULL) || (obj->magic != RTLD_MAGIC))
+               if (obj == NULL)
+                       _FATAL("NULL Obj_Entry pointer in GOT\n");
+               if (obj->magic != RTLD_MAGIC)
                        _FATAL("Corrupt Obj_Entry pointer in GOT\n");
                if (obj->version != RTLD_VERSION)
                        _FATAL("Dynamic linker version mismatch\n");



Home | Main Index | Thread Index | Old Index