Re: [Stlport-devel] Deallocation of 0-sized buffer
Brought to you by:
complement
From: Kees de B. <kee...@al...> - 2006-09-15 05:36:11
|
On Thursday 14 September 2006 22:11, Fran=E7ois Dumont wrote: > Are you talking about this kind of code: > > typedef allocator<char> CharAllocator; > CharAllocator charAllocator; > > char* buf =3D 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. It appeared as if a 0-sized buffer was deallocated, but the problem is much= =20 worse than expected and I cannot tell if our C++ or C compiler (it's an=20 embedded environment with a C++-to-C translating C++ compiler based on the= =20 EDG front-end) is at fault or the problem is with the STLport library. Situation is this: I have a single test file from the Perennial suite and=20 when I run this test without I/O stream support (disabled the _STLP_...=20 configuration macro) the test runs fine. When I enable the I/O stream=20 support I get an error from our simulator about illegal memory access. I've compared generated C code for both cases and couldn't find anything=20 out of the ordinary and now we're looking at a possible problem in the C=20 compiler. If I know more about the problem I will post it on the list. BTW, this is=20 with STLport 5.0.2. I haven't had the time yet to change to 5.1RC2 as this= =20 is a rather involved process. =2D-=20 Kees de Bruin Senior Software Engineer =2D------------------------------------------------------------------------= =2D- E-mail: kee...@al... Altium Software BV Voice: +31-33-455 85 84 Saturnus 2 =46ax: +31-33-455 55 03 3824 ME Amersfoo= rt WWW: http://www.altium.com The Netherlands =2D---------[ Despite the high cost of living, it remains popular ]--------= =2D- |