[Libreoffice] Unit tests - cppunit crashing with debug build

Caolán McNamara caolanm at redhat.com
Mon Jul 11 12:13:25 PDT 2011


On Mon, 2011-07-11 at 20:49 +0200, Lubos Lunak wrote:
> Hello,
> 
>  do the attached patches look ok? With debug build I have unit tests failing 
> because of _GLIBCXX_DEBUG mismatch (our code built with it, cppunit without), 
> leading to CppUnit::Message dtor (not explicitly defined, thus generated by 
> the compiler while compiling the unit test) accessing memory not allocated by 
> the ctor (located in the cppunit library).

I think the whole mixing code with and without -D_GLIBCXX_DEBUG is sadly
hopeless. "this flag changes the sizes and behavior of standard class
templates such as std::vector, and therefore you can only link code
compiled with debug mode and code compiled without debug mode if no
instantiation of a container is passed between the two translation
units."

I reckon we probably have to bite the bullet and drop -D_GLIBCXX_DEBUG
from solenv ?

C.

p.s. There is another hack e.g. include <debug/list> vs include <list>
which might be work investigating.



More information about the LibreOffice mailing list