1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* elf/dl-error.c (_dl_signal_error): When testing for executable

being relocated, take into account that nothing might even be loaded.
This commit is contained in:
Ulrich Drepper
2005-07-07 06:02:07 +00:00
parent 9f0d7b6df9
commit 587d6ddc60
2 changed files with 6 additions and 2 deletions

View File

@ -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