Re: [Stlport-devel] Deallocation of 0-sized buffer
Brought to you by:
complement
From: <fra...@fr...> - 2006-09-14 20:11:55
|
Are you talking about this kind of code: typedef allocator<char> CharAllocator; CharAllocator charAllocator; char* buf = charAllocator.allocate(0); charAllocator.deallocate(buf, 0); charAllocator.deallocate(0, 0); If so I have added it to unit tests and run it with a compiler without problem. Otherwise could you show some code explaining the issue. Thanks Kees de Bruin wrote: > While running Perennial I get a bus error from our simulator on an invalid > read. The error occurs in the _M_deallocate() function and is caused by a > 0-sized object being deallocated. Should this be allowed? Or is a guard > against this needed in _alloc.c. > > Kind regards, > > |