This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
A patch for dl-profile
- To: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- Subject: A patch for dl-profile
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Wed, 16 May 2001 21:29:07 -0700
The current ld.so will segfault if the profile data file is wrong:
# LD_PROFILE=libc.so.6 ls
/var/tmp/libc.so.6.profile: file is no correct profile data file for `libc.so.6'
zsh: 11010 segmentation fault LD_PROFILE=libc.so.6 ls
This patch will terminate ld.so before segfault.
H.J.
---
2001-05-16 H.J. Lu <hjl@gnu.org>
* elf/dl-profile.c (_dl_start_profile): Make incorrect date
file a fatal error.
--- elf/dl-profile.c.bad Tue Feb 27 22:22:10 2001
+++ elf/dl-profile.c Wed May 16 20:56:52 2001
@@ -316,9 +316,9 @@ _dl_start_profile (struct link_map *map,
if (addr != NULL)
__munmap ((void *) addr, expected_size);
- _dl_error_printf ("%s: file is no correct profile data file for `%s'\n",
+ _dl_fatal_printf ("%s: file is no correct profile data file for `%s'\n",
filename, _dl_profile);
- return;
+ /* NOTREACHED */
}
addr = (struct gmon_hdr *) __mmap (NULL, expected_size, PROT_READ|PROT_WRITE,