Fix the memory stomp running *core.internalformat.texture2d.depth_stencil*
authorLujin Wang <luwang@nvidia.com>
Tue, 28 Aug 2018 00:08:42 +0000 (17:08 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 14 Sep 2018 14:37:36 +0000 (10:37 -0400)
commitd5997d5bef94bda903ec1c4a25ca2288f74825b3
treeac7892322a56f2e132697bdda29eb34dc09898a4
parente7cc2409780e67261093eca746c9ec42064ce353
Fix the memory stomp running *core.internalformat.texture2d.depth_stencil*

On QNX, we hit "Malloc Check Failed" and crash running CTS 3.2.5.0 with,
Test case 'KHR-GLES*.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8'..
Malloc Check Failed: :/builds/workspace/sdp700/build_aarch64/lib/c/alloc/dlist.c:1134

In InternalformatCaseBase::convertUInt_24_8(), two unsigned int data were modified
instead of one, which led to memory stomp and crash during the returning of function
InternalformatCaseBase::generateTextureData(). Rewrite function convertUInt_24_8()
to properly convert float color vec to unsigned_int_24_8_depth24_stencil8.

Affects:
KHR-GLES*.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth24_stencil8

Compoments: OpenGL

VK-GL-CTS issue: 1329

Change-Id: I95dfa2be272136e7ecf71b4ef49b43b90813f077
external/openglcts/modules/common/glcInternalformatTests.cpp