On Sat, 7 Sep 2013, Martin Storsjö wrote:

On Sat, 7 Sep 2013, Luca Barbato wrote:

This partially reverts commit b634b36fcebfe16b837b6c4044f5d5cb99a75040.
---

My fault for not catching it before, Diego's fault for not fixing it timely.

To make it clear: glibc, musl, newlib, and everything else excluded openbsd

s/excluded/except/

and windows libc can CRASH if you pass to realloc a pointer provided by
memalign or posix_memalign.

"pass a pointer provided by ... to realloc"

The fact it does not happen in our codebase is because currently we always

"because we currently"

pass to realloc a pointer created by realloc.

"only pass pointers created by realloc to realloc", or perhaps "don't pass any pointers created by av_malloc to av_realloc".

Please include this part explanation in the commit message, not only as an annotation. Otherwise people will still stay confused and might try to "fix" it again.

Oh, also please add a reference to the posix realloc docs that explicitly say it only support pointers from a few certain functions, that doesn't include memalign.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to