On Friday 15 September 2006 09:35, Kees de Bruin wrote:
> On Thursday 14 September 2006 22:11, François Dumont wrote:
> > 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.
> It appeared as if a 0-sized buffer was deallocated, but the problem is much
> worse than expected and I cannot tell if our C++ or C compiler (it's an
> embedded environment with a C++-to-C translating C++ compiler based on the
> 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
> when I run this test without I/O stream support (disabled the _STLP_...
> configuration macro) the test runs fine. When I enable the I/O stream
> 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
> out of the ordinary and now we're looking at a possible problem in the C
Just hint: check the order of construction/destruction of global objects;
this order may be wrong, especially if you link with static libs.
The point of fail give some info really.
> If I know more about the problem I will post it on the list. BTW, this is
> with STLport 5.0.2. I haven't had the time yet to change to 5.1RC2 as this
> is a rather involved process.