Fix uninitialized stack memory used in topology refiner

The issue is that FeatureMask structure has size of an integer, but only
first 11 bytes are initialized, the rest is left non-initialized to a
stack memory of RefineAdaptive(). This will cause issues with IsEmpty()
which check whether any of integer's bits are set, effectively causing
jumps dependent on a non-initialized memory.
This commit is contained in:
Sergey Sharybin 2018-07-14 15:57:16 +02:00
parent 74601558e3
commit d6f68b17e8

View File

@ -263,7 +263,7 @@ namespace internal {
bool IsEmpty() const { return *((int_type*)this) == 0; }
FeatureMask() { Clear(); }
FeatureMask(Options const & options, Sdc::SchemeType sType) { InitializeFeatures(options, sType); }
FeatureMask(Options const & options, Sdc::SchemeType sType) { Clear(); InitializeFeatures(options, sType); }
// These are the two primary methods intended for use -- intialization via a set of Options
// and reduction of the subsequent feature set (which presumes prior initialization with the