[FFmpeg-devel] [PATCH] libavcodec/mpeg12dec: Use atomic addition for value updated in multiple threads.

2017-11-16 Thread Nick Lewycky
I initially discovered a signed integer overflow on this line. Since this value is updated in multiple threads, I use an atomic update and as it happens atomic addition is defined to wrap around. However, there's still a potential bug in that the error_count may wrap around and equal zero again cau

Re: [FFmpeg-devel] [PATCH] libavcodec/mpeg12dec: Use atomic addition for value updated in multiple threads.

2017-11-16 Thread Nick Lewycky
Sorry! Let's try an attachment then. On 16 November 2017 at 14:36, Michael Niedermayer wrote: > On Thu, Nov 16, 2017 at 12:41:32PM -0800, Nick Lewycky wrote: >> I initially discovered a signed integer overflow on this line. Since >> this value is updated in multiple thre

Re: [FFmpeg-devel] [PATCH] libavcodec/mpeg12dec: Use atomic addition for value updated in multiple threads.

2017-11-19 Thread Nick Lewycky
2017 at 12:49, Michael Niedermayer wrote: > On Fri, Nov 17, 2017 at 05:10:17PM -0300, James Almer wrote: > > On 11/17/2017 4:20 PM, James Almer wrote: > > > On 11/17/2017 4:16 PM, Michael Niedermayer wrote: > > >> On Thu, Nov 16, 2017 at 03:07:54PM -0800, Nick Le

[FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-06 Thread Nick Lewycky
Newer versions of clang will allocate %rbx as one of the inline asm inputs, even in PIC. This occurs when building ffmpeg with clang -fsanitize=address -O1 -fPIE. Because the asm does clobber %bx whether PIC is on or off, just include %bx in the clobber list regardless of whether PIC is on or off.

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-06 Thread Nick Lewycky
On 6 May 2015 at 11:58, Carl Eugen Hoyos wrote: > Nick Lewycky google.com> writes: > > > This occurs when building ffmpeg with clang > > -fsanitize=address -O1 -fPIE. > > What is the usecase for -O1? > It's very important for asan. ASan instruments every mem

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-06 Thread Nick Lewycky
On 6 May 2015 at 13:08, Carl Eugen Hoyos wrote: > Nick Lewycky google.com> writes: > > > On 6 May 2015 at 11:58, Carl Eugen Hoyos: > > > > > Nick Lewycky google.com> writes: > > > > > > > This occurs when building ffmpeg with clang > &g

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-06 Thread Nick Lewycky
On 6 May 2015 at 15:06, Michael Niedermayer wrote: > Hi > > On Wed, May 06, 2015 at 11:52:59AM -0700, Nick Lewycky wrote: > > Newer versions of clang will allocate %rbx as one of the inline asm > inputs, > > Thats great > > > > even in PIC. This oc

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-08 Thread Nick Lewycky
On 6 May 2015 at 18:03, Michael Niedermayer wrote: > On Wed, May 06, 2015 at 04:08:09PM -0700, Nick Lewycky wrote: > > On 6 May 2015 at 15:06, Michael Niedermayer wrote: > > > > > Hi > > > > > > On Wed, May 06, 2015 at 11:52:59AM -0700, Nick Lewycky w

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-08 Thread Nick Lewycky
On 8 May 2015 at 12:06, Michael Niedermayer wrote: > On Fri, May 08, 2015 at 10:50:49AM -0700, Nick Lewycky wrote: > > On 6 May 2015 at 18:03, Michael Niedermayer wrote: > > > > > On Wed, May 06, 2015 at 04:08:09PM -0700, Nick Lewycky wrote: > > > > On 6 Ma

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-11 Thread Nick Lewycky
On 8 May 2015 at 14:28, Michael Niedermayer wrote: > On Fri, May 08, 2015 at 12:43:20PM -0700, Nick Lewycky wrote: > > On 8 May 2015 at 12:06, Michael Niedermayer wrote: > > > > > On Fri, May 08, 2015 at 10:50:49AM -0700, Nick Lewycky wrote: > > > > On 6 Ma

Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx

2015-05-12 Thread Nick Lewycky
On 11 May 2015 at 16:18, Michael Niedermayer wrote: > On Mon, May 11, 2015 at 03:55:40PM -0700, Nick Lewycky wrote: > > On 8 May 2015 at 14:28, Michael Niedermayer wrote: > > > > > On Fri, May 08, 2015 at 12:43:20PM -0700, Nick Lewycky wrote: > > > > On 8 Ma