Title: [131205] trunk/Source/WebCore
- Revision
- 131205
- Author
- [email protected]
- Date
- 2012-10-12 11:46:25 -0700 (Fri, 12 Oct 2012)
Log Message
Local disable of stack corruption warning when compiling on VS2012
https://bugs.webkit.org/show_bug.cgi?id=99106
Patch by Scott Graham <[email protected]> on 2012-10-12
Reviewed by Ryosuke Niwa.
Warning is:
...\FEConvolveMatrix.cpp(274) : warning C4789: buffer 'totals' of size 12 bytes will be overrun; 4 bytes will be written starting at offset 12.
And similar at lines 281, 355, and 365. This appears to be incorrect
as the writes at offset 12 occur only when preserveAlphaValues is
false, and when it's false, totals will be 16 bytes long.
No new tests.
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131204 => 131205)
--- trunk/Source/WebCore/ChangeLog 2012-10-12 18:38:18 UTC (rev 131204)
+++ trunk/Source/WebCore/ChangeLog 2012-10-12 18:46:25 UTC (rev 131205)
@@ -1,3 +1,23 @@
+2012-10-12 Scott Graham <[email protected]>
+
+ Local disable of stack corruption warning when compiling on VS2012
+ https://bugs.webkit.org/show_bug.cgi?id=99106
+
+ Reviewed by Ryosuke Niwa.
+
+ Warning is:
+
+ ...\FEConvolveMatrix.cpp(274) : warning C4789: buffer 'totals' of size 12 bytes will be overrun; 4 bytes will be written starting at offset 12.
+
+ And similar at lines 281, 355, and 365. This appears to be incorrect
+ as the writes at offset 12 occur only when preserveAlphaValues is
+ false, and when it's false, totals will be 16 bytes long.
+
+ No new tests.
+
+ * platform/graphics/filters/FEConvolveMatrix.cpp:
+ (WebCore):
+
2012-10-11 Emil A Eklund <[email protected]>
[Sub pixel layout] Change RenderBox to not round logicalTop/Left for RenderReplaced
Modified: trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp (131204 => 131205)
--- trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp 2012-10-12 18:38:18 UTC (rev 131204)
+++ trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp 2012-10-12 18:46:25 UTC (rev 131205)
@@ -243,6 +243,12 @@
image->set(pixel++, maxAlpha);
}
+#if defined(_MSC_VER) && (_MSC_VER >= 1700)
+// Incorrectly diagnosing overwrite of stack in |totals| due to |preserveAlphaValues|.
+#pragma warning(push)
+#pragma warning(disable: 4789)
+#endif
+
// Only for region C
template<bool preserveAlphaValues>
ALWAYS_INLINE void FEConvolveMatrix::fastSetInteriorPixels(PaintingData& paintingData, int clipRight, int clipBottom, int yStart, int yEnd)
@@ -381,6 +387,10 @@
}
}
+#if defined(_MSC_VER) && (_MSC_VER >= 1700)
+#pragma warning(pop) // Disable of 4789
+#endif
+
ALWAYS_INLINE void FEConvolveMatrix::setInteriorPixels(PaintingData& paintingData, int clipRight, int clipBottom, int yStart, int yEnd)
{
// Must be implemented here, since it refers another ALWAYS_INLINE
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes