changeset 3775:3617a86b0236

6531189 SEGV in dladdr()
author ab196087
date Wed, 07 Mar 2007 14:08:19 -0800
parents 9e3b03d406cc
children df6e9487b972
files usr/src/cmd/sgs/packages/common/SUNWonld-README usr/src/cmd/sgs/rtld/common/elf.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/sgs/packages/common/SUNWonld-README	Wed Mar 07 11:21:49 2007 -0800
+++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README	Wed Mar 07 14:08:19 2007 -0800
@@ -1195,3 +1195,4 @@
 	memory
 6524709 executables using /usr/lib/libc.so.1 as the ELF interpreter dump core
 	(link-editor components only)
+6531189 SEGV in dladdr()
--- a/usr/src/cmd/sgs/rtld/common/elf.c	Wed Mar 07 11:21:49 2007 -0800
+++ b/usr/src/cmd/sgs/rtld/common/elf.c	Wed Mar 07 14:08:19 2007 -0800
@@ -2942,7 +2942,7 @@
 elf_dladdr(ulong_t addr, Rt_map *lmp, Dl_info *dlip, void **info, int flags)
 {
 	ulong_t		ndx, cnt, base, _value;
-	Sym		*sym, *_sym;
+	Sym		*sym, *_sym = NULL;
 	const char	*str;
 	int		_flags;
 	uint_t		*dynaddr_ndx;
@@ -3004,7 +3004,6 @@
 		 */
 		low_bnd = low;
 		high_bnd = high;
-		_sym = NULL;
 		while (low <= high) {
 			mid = (low + high) / 2;
 			mid_sym = &sym[dynaddr_ndx[mid]];