[FFmpeg-devel] [PATCH] dict.c: use av_mallocz instead of av_realloc

Paweł Hajdan phajdan at google.com
Tue Jan 29 13:47:49 CET 2013


On Tue, Jan 29, 2013 at 1:13 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> And if I understood one of your messages
> correctly, the issue only surfaced with
> a simulator and is not reproducible on
> any platform (but I may have misunderstood,
> hence my question).
>

debugallocation is not a simulator. In the referenced discussion fixing the
memalign/realloc mix has been listed as an acceptable solution provided
there are not too many such cases.


> Finally, I believe you wanted to suggest to
> the maintainers of google-perftools to change
> the code, because the C libraries appear to
> change documentation in this regard (and the
> new documentation makes sense to you iiuc).
>

I raised this with code maintainers at Google and the consensus reached is
that debugallocation should continue to catch the memalign/realloc mix,
since 1) older standards make no guarantees about it, and 2) it is not
obvious whether alignment would be preserved by realloc.


> That is why I asked for some more information,
> to at least mention in the commit message that
> this is only a theoretical issue (in case I
> understand correctly).


I still think all of it is addressed by the discussion link I included in
the commit message.

It is a practical issue because google-perftools is a widely used suite.


More information about the ffmpeg-devel mailing list