Two unit-tests fail by segmentation fault when using clang

Michael Stahl mstahl at redhat.com
Fri Nov 28 03:59:20 PST 2014


On 28.11.2014 00:57, Jean-Baptiste Faure wrote:
> Hi,
> 
> Le 26/11/2014 13:33, Michael Stahl a écrit :
>> On 24.11.2014 06:20, Jean-Baptiste Faure wrote:
>>> Hi,
>>>
>>> I try to build LibreOffice 4.4 and master on Ubuntu 14.10 x86-64 using
>>> clang (version 3.5.0) instead of gcc (version 4.9).
>>> I get two unit-test fails by segmentation fault:
>>> CppunitTest_basic_enable
>>> CppunitTest_basic_nested_struct
>>>
>>> It worked with gcc, so I guess the errors are related to the use of
>>> clang. Is there something I can do from my side?
>>
>> please (turn on --enable-debug or --enable-dbgutil if you haven't
>> already and) run the tests in a debugger with:
>>
>> CPPUNITTRACE="gdb --args"  make CppunitTest_basic_enable
>>
>> and when it crashes use "bt" to get a backtrace and post it here.
> 
> I first did a complete rebuild with --enable-debug turned on and all
> went fine, no crash.
> Then I did a complete rebuild with --enable-debug turned off and it
> failed CppunitTest_basic_enable with segmentation fault.
> So I turned on --enable-debug again, set export CPPUNITTRACE="gdb
> --args" and did only make CppunitTest_basic_enable
> 
> The gdb session gave that:

> Program received signal SIGSEGV, Segmentation fault.
> 0x00002aaabbf34464 in SbClassFactory::RemoveClassModule(SbModule*) ()
>    from [...]/LibO/master/instdir/program/libsblo.so
> (gdb) bt
> #0  0x00002aaabbf34464 in SbClassFactory::RemoveClassModule(SbModule*) ()
>    from [...]/LibO/master/instdir/program/libsblo.so
> #1  0x00002aaabbf6d8d0 in SbiCodeGen::Save() () from
> [...]/LibO/master/instdir/program/libsblo.so
> #2  0x00002aaabbf797fe in SbModule::Compile() () from
> [...]/LibO/master/instdir/program/libsblo.so
> #3  0x00002aaabbca69ae in MacroSnippet::Compile() ()
>    from
> [...]/LibO/master/workdir/LinkTarget/CppunitTest/libtest_basic_enable.so

it's possible that this is a bug in clang's optimizer, you may try to
touch basic/source/sbx/sbxobj.cxx and rebuild it with debug and see if
that works.  or perhaps the problem is with another cxx file in basic.




More information about the LibreOffice mailing list