From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geoff Keating To: drepper@cygnus.com Cc: kukuk@suse.de, libc-hacker@sourceware.cygnus.com Subject: Re: interesting change Date: Sat, 31 Jul 1999 20:42:00 -0000 Message-id: <199907310741.RAA00956@gluttony.geoffk.wattle.id.au> References: <19990731080219.A6381@Wotan.suse.de> <19990731085101.A9440@Wotan.suse.de> X-SW-Source: 1999-07/msg00131.html > Mailing-List: contact libc-hacker-help@sourceware.cygnus.com; run by ezmlm > List-Unsubscribe: < mailto:libc-hacker-unsubscribe-geoffk=discus.anu.edu.au@sourceware.cygnus.com > > List-Archive: < http://sourceware.cygnus.com/ml/libc-hacker/ > > List-Help: < mailto:libc-hacker-help@sourceware.cygnus.com >, > < http://sourceware.cygnus.com/ml/#faqs > > Cc: libc-hacker@sourceware.cygnus.com > Reply-To: drepper@cygnus.com (Ulrich Drepper) > From: Ulrich Drepper > Date: 30 Jul 1999 23:56:06 -0700 > > Thorsten Kukuk writes: > > > 1. One of our malloc function was called before the crash in > > a way that __libc_pagesize is not set the first time. > > The value is set in a constructor which runs before any application > code. Except if the application somehow inluences the constructors > which does not only break mallo.c It's possible that ld.so has started calling the wrong malloc() again. There's a short window when ld.so musn't call malloc(), because it will get the application's malloc before it has run the constructors. The easiest way to find this is to have a small application: void *malloc(size_t m) { write (STDOUT_FILENO, "malloc called\n", 14); return 0; } void _start(void) { write (STDOUT_FILENO, "ok to call malloc after this\n", 29); _exit(0); } -- Geoffrey Keating