[MPlayer-users] segfault on Alpha in libmpdemux/demux_mov.c
Adam Rice
adamrice at ntlworld.com
Wed Mar 3 02:19:20 CET 2004
Quoting Andrew A. Gill (superluser at frontiernet.net):
> More info. at the line directly above this one,
> trak->chunks = 0
> sizeof(mov_chunk_t) = 24
> len = 368
>
> Now, I'm not entirely sure, but isn't the first argument of
> realloc() supposed to be a pointer? And isn't 0 not in
> userspace?
realloc(0, size) is the same as malloc(size) in most malloc() implementations.
In my experience, this simplifies code that uses realloc() in most cases.
The manpage notes:
Crashes in malloc(), free() or realloc() are almost always related to
heap corruption, such as overflowing an allocated chunk or freeing the
same pointer twice.
It also mentions an environment variable, MALLOC_CHECK_, which will supposedly
detect such problems.
Adam
--
Adam Rice -- adamrice at ntlworld.com -- Blackburn, Lancashire, England
More information about the MPlayer-users
mailing list