On Tue, May 13, 2014 at 8:39 AM, Aaron Ballman <[email protected]> wrote:
> On Tue, May 13, 2014 at 11:35 AM, David Blaikie <[email protected]> wrote:
>> On Tue, May 13, 2014 at 7:55 AM, Aaron Ballman <[email protected]> 
>> wrote:
>>> Author: aaronballman
>>> Date: Tue May 13 09:55:01 2014
>>> New Revision: 208702
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=208702&view=rev
>>> Log:
>>> No longer triggering a checked iterator assert on Windows when using 
>>> std::copy while deserializing attributed statements with more than one 
>>> attribute.
>>
>> I have to say I don't quite follow where the checked failure would be
>> in the original code. Could you explain it?
>
> MSVC has an overload for std::copy that deduces array sizes for the
> destination argument. So const Attr *Attrs[1] was always being deduced
> as an array of a single element. Any time std::copy would be called
> where end - begin > 1, the check would assert, even though there was
> space allocated properly in practice. My change was simply to remove
> the array bounds (well, the entire member variable, since it wasn't
> needed anyway), so that array bounds could not be automatically
> deduced.

Ah, cool, thanks!
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to