Bug 1460357 Do not use optimized AVX for Skia convolve_vertically in MinGW r?lsalzman
MozReview-Commit-ID: 8ROpiDD4xYH
old mode 100644
new mode 100755
--- a/gfx/skia/skia/src/opts/SkOpts_hsw.cpp
+++ b/gfx/skia/skia/src/opts/SkOpts_hsw.cpp
@@ -7,17 +7,19 @@
// It is not safe to #include any header file here unless it has been vetted for ODR safety:
// all symbols used must be file-scoped static or in an anonymous namespace. This applies
// to _all_ header files: C standard library, C++ standard library, Skia... everything.
#include <immintrin.h> // ODR safe
#include <stdint.h> // ODR safe
-#if defined(__AVX2__)
+// As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85525, MinGW will produce
+// unaligned instructions for this code, resulting in a crash.
+#if defined(__AVX2__) && !defined(__MINGW32__)
namespace hsw {
void convolve_vertically(const int16_t* filter, int filterLen,
uint8_t* const* srcRows, int width,
uint8_t* out, bool hasAlpha) {
// It's simpler to work with the output array in terms of 4-byte pixels.
auto dst = (int*)out;