libstdc++, debug mode: resizing a vector doesn't update capacity
Bug #769601 reported by
Arne Redlich
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Fix Released
|
Medium
|
|||
gcc-4.4 (Ubuntu) |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Binary package hint: gcc-4.4
Bug details / code to reproduce / fix can be found in the upstream bug report:
http://
Even though this upstream bug report was filed against gcc-4.5, it's also present / reproducible with libstdc++6-4.4-dev, version 4.4.3-4ubuntu5 on Ubuntu 10.04.
tags: | added: rls-q-incoming |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
To post a comment you must log in.
The assertion in the following testcase should /not/ fail, but does:
#define _GLIBCXX_DEBUG DEBUG_PEDANTIC
#define _GLIBCXX_
#include <vector>
#include <cassert>
int main() :vector< int> v;
{
std:
v.resize(10);
assert(v.size() <= v.capacity());
}