From: Ulrich Drepper Date: Thu, 7 Jul 2005 06:02:07 +0000 (+0000) Subject: * elf/dl-error.c (_dl_signal_error): When testing for executable X-Git-Tag: upstream/2.30~16601 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=587d6ddc60bbdf561be3f217280220af9102c3e8;p=external%2Fglibc.git * elf/dl-error.c (_dl_signal_error): When testing for executable being relocated, take into account that nothing might even be loaded. --- diff --git a/ChangeLog b/ChangeLog index 8d3fd11..adcb3fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-07-06 Ulrich Drepper + * elf/dl-error.c (_dl_signal_error): When testing for executable + being relocated, take into account that nothing might even be loaded. + * elf/dl-reloc.c [PROF] (_dl_relocate_object): Define consider_profiling always to zero. Don't count of compiler to remove unreached if block. diff --git a/elf/dl-error.c b/elf/dl-error.c index a63d801..3a0d9bb 100644 --- a/elf/dl-error.c +++ b/elf/dl-error.c @@ -98,8 +98,9 @@ _dl_signal_error (int errcode, const char *objname, const char *occation, /* If the main executable is relocated it means the libc's malloc is used. */ #ifdef SHARED - lcatch->malloced = (GL(dl_ns)[LM_ID_BASE]._ns_loaded->l_relocated - != 0); + lcatch->malloced = (GL(dl_ns)[LM_ID_BASE]._ns_loaded != NULL + && (GL(dl_ns)[LM_ID_BASE]._ns_loaded->l_relocated + != 0)); #else lcatch->malloced = true; #endif