Hello, I am not certain what the standard says about this, but the following code causes a segmentation fault under various versions of g++ . It is a bit strange off course to allocate segments of length 0, but for symmetry it makes sense to allow it. yours, Hans. #include <memory> int main( int argc, char * argv[] ) { unsigned int len = 0; std::allocator< int > a; int* p = a. allocate( len ); a. deallocate( p, len ); };
This is fixed in 3.4.0, and a testsuite added to prevent it from resurfacing.
Fixed in 3.4.0 according to Benjamin Kosnik, so I'm closing it.