Microsoft KB Archive/160017

= FIX: Access Violation Using deque class =

Article ID: 160017

Article Last Modified on 11/18/2003

-

APPLIES TO

 The Standard C++ Library, when used with:  Microsoft Visual C++ 4.2 Enterprise Edition

 Microsoft Visual C++ 4.2 Professional Edition 

-



This article was previously published under Q160017



SYMPTOMS
If your deque class allocates more than one page of memory, you may encounter access violation. Please refer to the sample code in the MORE INFORMATION section of this article for details.



CAUSE
There is a bug in the Standard C++ library header file "deque". The bug is in the _Buyback member function of the deque template class.



RESOLUTION
At this time, there is no workaround.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 5.0.

<div class="moreinformation_section">

Sample Code
/* Compile options needed:None */

//test.cpp #include

#if _MSC_VER > 1020 // later than version 4.2 using namespace std; #endif

typedef deque<int, allocator > DEQUEINT;

void main {

DEQUEINT dint;

for(int i=0;i<=5000;i++){ dint.push_back(10); }

}

Additional query words: kbVC420bug kbDSupport gpf access violation crash

Keywords: kbbug kbfix kbvc500fix KB160017

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.