[LLVMdev] Win32 JIT issue + bug in ScheduleDAGSNodes.h?

srs
2008-12-31T13:57:36Z

Bill Wendling wrote:
> On Dec 30, 2008, at 4:51 PM, srs wrote:
>
>
>> 2. There seems to be an issue in ScheduleDAGSDNodes.h when in debug
>> mode. The problem is the evaluation of "&SUnits[0];"
which ASSERT's in
>> VC++'s vector[] implementation (when _HAS_ITERATOR_DEBUGGING is
on).
>>
>> As a work-around, I commented out the debug code (see "patch"
below.)
>>
>> What would the proper solution be? The idiom appears to be allowed by
>> the C++03 standard, but at least VC++ 2008 Express Edition with
>> _HAS_ITERATOR_DEBUGGING fails.
>>
>>
> What is the assertion message?
>
> -bw
>

"vector subscript out of range"

This is the asserting code from <vector> :


    const_reference operator[](size_type _Pos) const
        {    // subscript nonmutable sequence

 #if _HAS_ITERATOR_DEBUGGING
        if (size() <= _Pos)
            {
            _DEBUG_ERROR("vector subscript out of range");
            _SCL_SECURE_OUT_OF_RANGE;
            }
 #endif /* _HAS_ITERATOR_DEBUGGING */
        _SCL_SECURE_VALIDATE_RANGE(_Pos < size());

        return (*(_Myfirst + _Pos));
        }


/Stein Roger