Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Issue 2516703002: Remove /arch:AVX and /arch:AVX2 from libvpx (Closed)

Created:
4 years, 1 month ago by brucedawson
Modified:
4 years ago
Reviewers:
Nico, Tom Finegan, mtklein_C
CC:
chromium-reviews, wwcv, fgalligan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove /arch:AVX and /arch:AVX2 from libvpx Mixing translation units compiled with /arch:AVX and /arch:AVX2 with those compiled 'normally' can lead to illegal instruction crashes. The problem is that if an inline function (such as ceilf or floorf) is called from /arch:AVX* code but not inlined then AVX code may be generated and this version of the function may be selected by the linker. It's an ODR violation, essentially. The problem of inline functions in /arch:AVX* translation units can be solved by marking the functions as static or putting them in an anonymous namespace, or it can be hacked around with __forceinline, but none of these work well for CRT inline functions. clang-cl doesn't allow using AVX intrinsics without /arch:AVX which is why /arch:AVX is retained in clang-cl. BUG=666707

Patch Set 1 #

Patch Set 2 : Fixed line length #

Patch Set 3 : Reenable /arch:AVX* for clang-cl, and mandatory gn format??? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -4 lines) Patch
M third_party/libvpx/BUILD.gn View 1 2 3 chunks +16 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
brucedawson
I'm not thrilled about having to do this, but without this change we can't guarantee ...
4 years, 1 month ago (2016-11-18 20:03:59 UTC) #6
jzern
On 2016/11/18 20:03:59, brucedawson wrote: > I'm not thrilled about having to do this, but ...
4 years, 1 month ago (2016-11-18 22:27:00 UTC) #10
brucedawson
On 2016/11/18 22:27:00, jzern wrote: > On 2016/11/18 20:03:59, brucedawson wrote: > > I'm not ...
4 years, 1 month ago (2016-11-18 22:51:17 UTC) #11
Tom Finegan
On 2016/11/18 22:51:17, brucedawson wrote: > On 2016/11/18 22:27:00, jzern wrote: > > On 2016/11/18 ...
4 years, 1 month ago (2016-11-18 22:53:05 UTC) #12
brucedawson
thakis@ and mtklein@ - this CL may be an important part of getting canary stable ...
4 years, 1 month ago (2016-11-18 23:05:02 UTC) #14
mtklein_C
On 2016/11/18 at 23:05:02, brucedawson wrote: > thakis@ and mtklein@ - this CL may be ...
4 years, 1 month ago (2016-11-18 23:58:06 UTC) #17
Nico
I agree with that. We've had this code here for a long time without problems. ...
4 years, 1 month ago (2016-11-19 00:18:24 UTC) #18
Nico
(without apparent problems, that is) On Fri, Nov 18, 2016 at 7:18 PM, Nico Weber ...
4 years, 1 month ago (2016-11-19 00:18:31 UTC) #19
brucedawson
> >> I think I've found a likely proximal cause of the problem we were ...
4 years, 1 month ago (2016-11-20 15:38:55 UTC) #20
mtklein_C
4 years, 1 month ago (2016-11-21 13:35:13 UTC) #21
On 2016/11/20 at 15:38:55, brucedawson wrote:
> > >> I think I've found a likely proximal cause of the problem we were seeing:
> > >> - SkOpts_hsw.cpp includes SkRasterPipeline_opts.h
> > >> - SkRasterPipeline_opts.h includes SkColorSpaceXformPriv.h
> > >> - SkColorSpaceXformPriv.h uses sk_float_floor2int() and
> > >> sk_float_ceil2int(),
> > >> which boil down to floorf() and ceilf().
> > >> This all came together recently, last week or so.
> > >>
> > >> So I think there's probably no rush to fix things outside Skia. It feels
> > >> pretty
> > >> likely that if I get the Skia bits turned off, the current crashes will
> > >> stop.
> > >>
> > >> The underlying problem is very real. Just may not be a panic.
> 
> That sounds like it maps to the problem, so that's good. Given the
unpredictability of this bug the only real test is to see whether the crashes go
away. Looking at the bug I'm seeing mixed reports about whether the crashes have
gone away. One report says yes, but fracas (and my quick manual inspection of
the crash data) shows that they are continuing.

Still think it's not time to panic.  The builds fracas is mentioning are
pre-fix.  The first build with "Stub out Skia AVX and HSW opts." in it is
57.0.2926.0.

Powered by Google App Engine
This is Rietveld 408576698