Potential uninit variable read in release build when invariants violated in IntermLoop::GetChildNode
Categories
(Core :: Graphics, defect)
Tracking
()
People
(Reporter: mlfbrown, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
The issue is in TIntermLoop::getChildNode:
(https://dxr.mozilla.org/mozilla-central/source/gfx/angle/checkout/src/compiler/translator/IntermNode.cpp#232)
TIntermNode *children[4]; // uninitialized
unsigned int childIndex = 0;
if (mInit) // check false
...
if (mCond) // check false
...
if (mExpr) // check false
...
if (mBody) // check false
...
ASSERT(index < childIndex); // assert compiled out in release build
return children[index]; // uninitialized memory
This is only triggered when the invariant 'index < childIndex' is violated in release mode, so filing as a normal bug instead of security.
Comment 1•7 years ago
|
||
I don't know how to reproduce this issue as it's to technical for me.
Chris can you take a look at this, maybe you have a better idea on where to start on this?
Comment 2•7 years ago
|
||
Previous component was set by accident, waiting for Chris to answer or to set an appropriate component.
Comment 3•7 years ago
|
||
(In reply to Fraser Brown from comment #0)
This is only triggered when the invariant 'index < childIndex' is violated in release mode, so filing as a normal bug instead of security.
Is this a compiler warning or a runtime assertion failure? What are the STR?
The file gfx/angle/checkout/src/compiler/translator/IntermNode.cpp is from the upstream ANGLE library:
https://chromium.googlesource.com/angle/angle/+/master/src/compiler/translator/IntermNode.cpp
Sorry, I completely missed this question. It's not a runtime failure, just a warning, so not even sure if important.
Comment 5•7 years ago
|
||
Thank you for the report.
As mentioned in the comment 3, this is an upstream issue, and should be fixed there.
Description
•