On 2002.03.13 Bryan Paxton wrote:
> Just making sure this got though, didn't get it back via the list...
>
>On Wed, 2002-03-13 at 11:12, Bryan Paxton wrote:
>> On Wed, 2002-03-13 at 10:53, Gwenole Beauchesne wrote:
>>
>> The program was copied from a prior email...
>> Per your wise suggestion:
>> $ cat 2free.c
>> #include <stdio.h>
>> #include <stdlib.h>
>>
>> int main(int argc, char* argv[]) {
>> void* foo = malloc(16);
>> free(foo);
>> foo = NULL;
>> free(foo);
>> printf("Program ran to completion.\n");
>> }
>> $ export MALLOC_CHECK=2 && gcc -o 2free 2free.c && ./2free
>> Program ran to completion.
>> $
>>
>> (GC noted correctly that gcc may/may not honor the env var)
>>
Buglet. Try:
werewolf:~/io> export MALLOC_CHECK_=3
^^^ (missing underscore)
werewolf:~/io> kk
malloc: using debugging hooks
free(): invalid pointer 0x80496d0!
Aborted
--
J.A. Magallon # Let the source be with you...
mailto:[EMAIL PROTECTED]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.19-pre3-jam2 #1 SMP Wed Mar 13 00:56:29 CET 2002 i686