O
Old Wolf
The following code causes a deallocation of a random amount of
bytes, with the Rogue Wave STL supplied with Borland C++ 5.5.1 :
#include <vector>
int main()
{
std::vector<char> v, w(1);
v = w;
}
There is a bug in the vector:
perator= code that uses the wrong
value when determining how much memory to deallocate when
deallocating the old contents of v.
I'm amazed that a company which provides STL implementations to
professional compiler vendors, can let this slip through their
QA system. I couldn't find any mention of it in their Knowledge
Base either (although it has a very hard to use search system),
and you can't enter the RW STL patches area of their website
without a login ID. There's no mention of it on Borland's site
either.
Does anyone know if later versions fixed this (eg. BCC 5.6.4),
or if there are any freely-available patches? Are there any
more howlers like this one that I haven't come across yet?
bytes, with the Rogue Wave STL supplied with Borland C++ 5.5.1 :
#include <vector>
int main()
{
std::vector<char> v, w(1);
v = w;
}
There is a bug in the vector:
value when determining how much memory to deallocate when
deallocating the old contents of v.
I'm amazed that a company which provides STL implementations to
professional compiler vendors, can let this slip through their
QA system. I couldn't find any mention of it in their Knowledge
Base either (although it has a very hard to use search system),
and you can't enter the RW STL patches area of their website
without a login ID. There's no mention of it on Borland's site
either.
Does anyone know if later versions fixed this (eg. BCC 5.6.4),
or if there are any freely-available patches? Are there any
more howlers like this one that I haven't come across yet?