This is the mail archive of the 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]

Remove set of __libc_stack_end from mips/dl-machine.h

sysdep/mips/dl-machine.h tries to overwrite __libc_stack_end after the
GNU_RELRO region has been write-protected, thus triggering a bus error.
The store seems to be completely redundant since _dl_start() already
sets the variable to the same value.

FWIW, just before submitting this, I noticed that cgd had suggested
the same patch last year:

but that was before the GNU_RELRO stuff was added, and it didn't go in.

Tested on mips64-linux-gnu (all three ABIs).  Please install if OK.


	* sysdeps/mips/dl-machine.h (_dl_start_user): Don't set

Index: sysdeps/mips/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
retrieving revision 1.74
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.74 dl-machine.h
*** sysdeps/mips/dl-machine.h	20 Jul 2004 16:35:32 -0000	1.74
--- sysdeps/mips/dl-machine.h	24 Aug 2004 18:02:04 -0000
*************** _dl_start_user:\n\
*** 485,492 ****
  	move $16, $28\n\
  	# Save the user entry point address in a saved register.\n\
  	move $17, $2\n\
- 	# Store the highest stack address\n\
- 	" STRINGXP(PTR_S) " $29, __libc_stack_end\n\
  	# See if we were run as a command with the executable file\n\
  	# name as an extra leading argument.\n\
  	lw $2, _dl_skip_args\n\
--- 485,490 ----

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