FFmpeg/libavcodec
Yang Wang 845e92fd6a dsputil_mmx: fix incorrect assembly code
In ff_put_pixels_clamped_mmx(), there are two assembly code blocks.
In the first block (in the unrolled loop), the instructions
"movq 8%3, %%mm1 \n\t", and so forth, have problems.

From above instruction, it is clear what the programmer wants: a load from
p + 8. But this assembly code doesn’t guarantee that. It only works if the
compiler puts p in a register to produce an instruction like this:
"movq 8(%edi), %mm1". During compiler optimization, it is possible that the
compiler will be able to constant propagate into p. Suppose p = &x[10000].
Then operand 3 can become 10000(%edi), where %edi holds &x. And the instruction
becomes "movq 810000(%edx)". That is, it will stride by 810000 instead of 8.

This will cause a segmentation fault.

This error was fixed in the second block of the assembly code, but not in
the unrolled loop.

How to reproduce:
    This error is exposed when we build using Intel C++ Compiler, with
    IPO+PGO optimization enabled. Crashed when decoding an MJPEG video.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-07-25 14:22:18 -04:00
..
2012-04-21 18:56:19 +01:00
2012-03-26 13:00:10 +02:00
2012-07-22 17:38:55 -04:00
2012-03-26 13:00:10 +02:00
2012-04-29 01:08:37 +01:00
2012-06-08 13:14:38 -04:00
2012-05-05 22:04:21 +01:00
2012-05-05 22:04:21 +01:00
2012-05-05 22:04:21 +01:00
2012-05-05 22:04:21 +01:00
2012-05-05 22:04:21 +01:00
2012-05-01 00:21:30 +01:00
2012-03-21 15:04:42 -04:00
2012-07-22 07:58:54 +02:00
2012-07-01 20:38:14 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-07-03 17:35:11 +02:00
2012-05-10 16:40:43 +02:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-03-31 08:14:54 -07:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-05-06 19:18:27 +02:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-03-24 19:02:26 -07:00
2012-04-06 22:37:38 +03:00
2012-07-01 20:38:14 +01:00
2012-04-06 22:37:38 +03:00
2012-06-17 23:20:10 +01:00
2012-06-17 23:20:10 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-05-06 19:18:02 +02:00
2012-05-23 20:42:46 +02:00
2012-07-04 15:10:57 +03:00
2012-04-12 18:34:45 -07:00
2012-07-05 21:57:51 +01:00
2012-04-06 22:37:38 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-07-22 07:58:54 +02:00
2012-07-22 07:58:54 +02:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-07-23 16:27:53 +02:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-06-09 08:38:31 +02:00
2012-04-21 18:56:19 +01:00
2012-04-21 18:56:19 +01:00
2012-03-14 15:34:50 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-05-08 07:24:31 +02:00
2012-03-28 07:06:47 -07:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-16 14:09:52 -07:00
2012-04-06 22:37:38 +03:00
2012-03-21 12:49:36 -04:00
2012-04-06 22:37:38 +03:00
2012-03-29 11:36:14 -07:00
2012-04-06 22:37:38 +03:00
2012-07-22 07:58:54 +02:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-07-09 17:20:52 +02:00
2012-04-06 22:37:38 +03:00
2012-06-05 06:55:57 +02:00
2012-04-21 18:56:19 +01:00
2012-07-04 15:10:57 +03:00
2012-07-04 15:10:57 +03:00
2012-04-21 18:56:19 +01:00
2012-07-09 18:17:51 +02:00
2012-07-13 06:59:48 +02:00
2012-04-06 22:37:38 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-05-17 02:34:57 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-03-21 12:49:36 -04:00
2012-06-08 13:14:38 -04:00
2012-04-06 22:37:38 +03:00
2012-03-19 18:46:34 +01:00
2012-07-04 15:10:57 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-07-01 20:38:14 +01:00
2012-04-06 22:37:38 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-07-01 20:38:14 +01:00
2012-04-06 22:37:38 +03:00
2012-07-03 12:16:39 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-13 12:58:19 -07:00
2012-07-11 07:29:05 +02:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-21 18:56:19 +01:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00
2012-03-17 15:45:04 -04:00
2012-04-06 22:37:38 +03:00
2012-07-03 17:35:11 +02:00
2012-03-18 07:45:41 -07:00
2012-04-06 22:37:38 +03:00
2012-07-23 11:35:21 -04:00
2012-04-06 22:37:38 +03:00
2012-04-06 22:37:38 +03:00