At Fri, 17 Jan 2003 23:06:38 -0500,
Clint Adams wrote:
> What's wrong here?
> 
> mimic% cat test.c
> main() {
> char *a=(char *)malloc(1);
> free(a);
> }

At least you have to add #include <stdlib.h>.

> mimic% gcc test.c -o test
> mimic% ./test
> mimic% MALLOC_CHECK_=0 ./test
> mimic% MALLOC_CHECK_=1 ./test
> malloc: using debugging hooks
> free(): invalid pointer 0x21010!
> mimic% MALLOC_CHECK_=2 ./test
> zsh: abort      MALLOC_CHECK_=2 ./test

My libc6 2.3.1-9 does not say such error.
Which is your architecture, kernel, and gcc version?

And run 'ldd ./test'.  I guess it's your environment problem, please
check which library is used.

-- gotom



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to