changeset 4065:f202696c68dd

6547441 Uninitialized variable causes ld.so.1 to crash on object cleanup
author rie
date Thu, 19 Apr 2007 11:09:06 -0700
parents 66e3f3aebd89
children 85a0846b16f6
files usr/src/cmd/sgs/packages/common/SUNWonld-README usr/src/cmd/sgs/rtld/common/remove.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/sgs/packages/common/SUNWonld-README	Thu Apr 19 09:27:57 2007 -0700
+++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README	Thu Apr 19 11:09:06 2007 -0700
@@ -1228,3 +1228,4 @@
 	versioning
 6541004 hwcap filter processing can leak memory
 5108874 elfdump SEGVs on bad object file
+6547441 Uninitialized variable causes ld.so.1 to crash on object cleanup
--- a/usr/src/cmd/sgs/rtld/common/remove.c	Thu Apr 19 09:27:57 2007 -0700
+++ b/usr/src/cmd/sgs/rtld/common/remove.c	Thu Apr 19 11:09:06 2007 -0700
@@ -859,6 +859,8 @@
 		if (((ghp = hdl_create(lml, lmc->lc_head, 0, 0)) == 0) ||
 		    (hdl_initialize(ghp, lmc->lc_head, 0, 0) == 0))
 			lmc->lc_flags &= ~LMC_FLG_RELOCATING;
+	} else {
+		ghp = 0;
 	}
 
 	/*
@@ -875,6 +877,8 @@
 		return;
 	}
 
+	ASSERT(ghp != 0);
+
 	/*
 	 * As the objects of this handle are being forcibly removed, first
 	 * remove any associations to objects on parent link-map control