[FFmpeg-devel] lurking bugs in the mmx-related assembler code (?)

Henrik Gramner henrik at gramner.com
Sat Oct 1 19:38:49 EEST 2016


On Sat, Oct 1, 2016 at 5:37 PM,  <u-h8zb at aetey.se> wrote:
> musl libc which uses floating point in its malloc() implementation.

That's honestly the real "WTF?" here.

On Sat, Oct 1, 2016 at 5:56 PM,  <u-h8zb at aetey.se> wrote:
> On Sat, Oct 01, 2016 at 05:44:13PM +0200, wm4 wrote:
>> AFAIK most MMX code in FFmpeg does not run emms (i.e. keeps the FPU
>> state trashed) until returning to the API user.
>
> This means when malloc()/free()/... happens to be called internally,
> it corrupts the malloc structures, in a non-straightforward ways.

In that case use emms_c() before calling those functions.


More information about the ffmpeg-devel mailing list