Boost logo

Boost :

Subject: Re: [boost] [utf8_codecvt_facet]
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-12-11 12:09:35


Marshall Clow wrote:
 ...

No good deed goes unpunished.

> So, after discussing this with Beman (since it's his library), I
> changed the code to look like this:
>
> // Only do CONST on older Dinkumware libraries.
> #if defined(_CPPLIB_VER) && (_CPPLIB_VER < 540)
> #define BOOST_CODECVT_DO_LENGTH_CONST const
> #else
> #define BOOST_CODECVT_DO_LENGTH_CONST
> #endif
>
> If that's causing problems for you, I apologize, and I'll be happy to
> work with you to fix it - though I don't understand _how_ it's
> causing problems. I tried changing the macro to always be "const",
> and the test still hung for me (on both clang and gcc)

I'm at a loss here as well. I can't see why such a change would
cause the test to fail with wchar_t types. For all I know, the test
might be wrong. But then a couple (not all) serialization library
tests fail - all these use codecvt with wchar_t. The failure indicates
that there is some problem with malloc usage like double delete. So
that would be pretty deep in some component. The fact that it
doesn't fail every where suggests that there is some memory overwrite
which sometimes corrupts the heap which then shows up as this test
failure. I've had trouble setting up GDB for this test. This would be
my normal approach.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk