This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/8230: Buggy allocator behaviour
- From: bkoz at gcc dot gnu dot org
- To: bkoz at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gdr at nerim dot net, jkanze at caicheuvreux dot com, nobody at gcc dot gnu dot org
- Date: 13 Nov 2002 22:19:11 -0000
- Subject: Re: libstdc++/8230: Buggy allocator behaviour
- Reply-to: bkoz at gcc dot gnu dot org, bkoz at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gdr at nerim dot net, jkanze at caicheuvreux dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: Buggy allocator behaviour
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Wed Nov 13 14:19:11 2002
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->feedback
State-Changed-By: bkoz
State-Changed-When: Wed Nov 13 14:19:11 2002
State-Changed-Why:
I don't think this is an allocator::allocate issue per se. The member function reserve is only in std::vector and std::vector<bool>, and the standard says
23.2.4.2 - vector capacity
-4- Throws: length_error if n > max_size().*
Where allocator::allocate doesn't know what vector::max_size is.
This fix brings the code up to conformance, and is the best fix I think.
-benjamin
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8230