This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] IA64: Uninitialized pointer in _dl_static_init


Hello,

 While testing variable page support for MIPS I've discovered
_dl_lookup_symbol() triggers a segmentation fault if passed an
uninitialized pointer as ref.  This happens because ref is used for symbol
lookup as well unless NULL.  Here is a fix.

2003-12-22  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>

	* sysdeps/unix/sysv/linux/ia64/dl-static.c (_dl_static_init): 
	Initialize ref before passing it to _dl_lookup_symbol().

 Please apply.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

glibc-2.3.2-ia64-dl-static.patch
diff -up --recursive --new-file glibc-2.3.2.macro/sysdeps/unix/sysv/linux/ia64/dl-static.c glibc-2.3.2/sysdeps/unix/sysv/linux/ia64/dl-static.c
--- glibc-2.3.2.macro/sysdeps/unix/sysv/linux/ia64/dl-static.c	2003-01-17 19:13:56.000000000 +0000
+++ glibc-2.3.2/sysdeps/unix/sysv/linux/ia64/dl-static.c	2003-12-22 18:24:55.000000000 +0000
@@ -49,7 +49,7 @@ static void *variables[] =
 void
 _dl_static_init (struct link_map *map)
 {
-  const ElfW(Sym) *ref;
+  const ElfW(Sym) *ref = NULL;
   lookup_t loadbase;
   void (*f) (void *[]);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]