diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-23 09:20:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-23 09:20:59 +0000 |
commit | 7fec4f2f70d417b858127d340f7e8f66d8053572 (patch) | |
tree | c511d342ff5b55a1eaf970a60a1b8ff972dc6ec3 /elf/dl-profile.c | |
parent | 557fab43bd3cf75f87ba7efb65c9f4884e261a6c (diff) | |
download | glibc-7fec4f2f70d417b858127d340f7e8f66d8053572.tar.gz glibc-7fec4f2f70d417b858127d340f7e8f66d8053572.tar.xz glibc-7fec4f2f70d417b858127d340f7e8f66d8053572.zip |
Update.
* elf/sprof.c (load_profdata): If do_test provide information as to why loading failed. * elf/dl-profile.c (_dl_start_profile): Initialize all of hist_hdr.dimen.
Diffstat (limited to 'elf/dl-profile.c')
-rw-r--r-- | elf/dl-profile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/elf/dl-profile.c b/elf/dl-profile.c index 19d1865c25..05b5c28fcb 100644 --- a/elf/dl-profile.c +++ b/elf/dl-profile.c @@ -260,7 +260,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir) *(int32_t *) hist_hdr.hist_size = kcountsize / sizeof (HISTCOUNTER); *(int32_t *) hist_hdr.prof_rate = __profile_frequency (); if (sizeof (hist_hdr.dimen) >= sizeof ("seconds")) - memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds")); + { + memcpy (hist_hdr.dimen, "seconds", sizeof ("seconds")); + memset (hist_hdr.dimen + sizeof ("seconds"), '\0', + sizeof (hist_hdr.dimen) - sizeof ("seconds")); + } else strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen)); hist_hdr.dimen_abbrev = 's'; |