diff options
author | Andrew Knight <andrew.knight@theqtcompany.com> | 2014-11-25 13:31:20 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-26 10:47:01 +0100 |
commit | 9b01589e58d458b6367b3578079e73ddc2ef458f (patch) | |
tree | b1077ab4d068b1fe97ee8e67e397677b2c715a45 /src/gui | |
parent | 155306ffee1941194d44dd632a7993fce4a05606 (diff) |
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 <maurice.kalinowski@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |