From 9b01589e58d458b6367b3578079e73ddc2ef458f Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Tue, 25 Nov 2014 13:31:20 +0200 Subject: Turn off optimizations of qt_depthForFormat on Windows Runtime ARM This function is apparently optimized in a way that gives a bad return value (or leaves the variable where it is used uninitialized), leading to extreme memory allocations and eventual heap exhaustion. Task-number: QTBUG-42038 Change-Id: Ia4ee9fc6475a0bf40e25eed356b027a4dc68d119 Reviewed-by: Maurice Kalinowski --- src/gui/image/qimage_p.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/image/qimage_p.h') diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index eec54ed4eb..7e2d4305ef 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -116,6 +116,9 @@ void qInitImageConversions(); const uchar *qt_get_bitflip_array(); Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image); +#if defined(Q_OS_WINRT) && defined(_M_ARM) // QTBUG-42038 +#pragma optimize("", off) +#endif inline int qt_depthForFormat(QImage::Format format) { int depth = 0; @@ -158,6 +161,9 @@ inline int qt_depthForFormat(QImage::Format format) } return depth; } +#if defined(Q_OS_WINRT) && defined(_M_ARM) +#pragma optimize("", on) +#endif QT_END_NAMESPACE -- cgit v1.2.3