Skip to content
  • Sean McBride's avatar
    Prevent writing of non-0/1 values into bool · 8e7375d3
    Sean McBride authored
    When running the test 'vtkCommonCoreTcl-TestSetGet',
    clang's -fsanitize=bool complained:
    
    runtime error: load of value 37, which is not a valid value for type 'bool'
    
    The code called resize() on an stl vector which ended up using the default
    constructor (which didn't initialize any ivars) and then subsequent new items
    (I think) were copied from this one prototype by
    IVFDataSetInfo::IVFDataSetInfo(const IVFDataSetInfo &ivfci)
    which then copied the randomly-initialized bool into another bool,
    and thus the error.  Fixed by zeroing everything in the default ctor.
    
    Change-Id: Icd1a8c1b6a6eb84b525048b0177910f2a7d2f855
    8e7375d3