Bug 85365 - Build failure: assertion failed in CppunitTest_writerperfect_stream with clang 3.5
Summary: Build failure: assertion failed in CppunitTest_writerperfect_stream with clan...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected) Master
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2014-10-23 13:18 UTC by Luke
Modified: 2015-01-27 02:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2014-10-23 13:18:14 UTC
Currently it's impossible to build LO with the compliers on Ubuntu 14.10. Bug 78174 prevents gcc from working. And this error prevents clang from working. 

$ lsb_release -rcd ; uname -rm
Description:	Ubuntu 14.10
3.16.0-22-generic i686

$ clang --version
Ubuntu clang version 3.5.0-4ubuntu2 (tags/RELEASE_350/final) 

$ cat autogen.input 

Build log:
[build CHK] filter
[build CUT] writerperfect_stream
/media/luke/69e81ab4-a375-4ae1-afad-ded6e0f00c45/home/luke/Downloads/lo/core/writerperfect/qa/unit/WPXSvStreamTest.cxx:330:(anonymous namespace)::WPXSvStreamTest::testStructured
assertion failed
- Expression: !pSubStream->isEnd()

Test name: (anonymous namespace)::WPXSvStreamTest::testStructured
assertion failed
- Expression: !pSubStream->isEnd()

Failures !!!
Run: 9   Failure total: 1   Failures: 1   Errors: 0

Error: a unit test failed, please do one of:

export DEBUGCPPUNIT=TRUE            # for exception catching
export CPPUNITTRACE="gdb --args"    # for interactive debugging on Linux
export CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio
export VALGRIND=memcheck            # for memory checking

and retry using: make CppunitTest_writerperfect_stream

/media/luke/69e81ab4-a375-4ae1-afad-ded6e0f00c45/home/luke/Downloads/lo/core/solenv/gbuild/CppunitTest.mk:76: recipe for target '/media/luke/69e81ab4-a375-4ae1-afad-ded6e0f00c45/home/luke/Downloads/lo/core/workdir/CppunitTest/writerperfect_stream.test' failed
make[1]: *** [/media/luke/69e81ab4-a375-4ae1-afad-ded6e0f00c45/home/luke/Downloads/lo/core/workdir/CppunitTest/writerperfect_stream.test] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:231: recipe for target 'build' failed
make: *** [build] Error 2
Comment 1 Joel Madero 2014-10-24 03:34:23 UTC
Luke - you might get faster input if you email the dev list. Just a suggestion
Comment 2 David Tardon 2014-10-24 10:53:26 UTC
Well, this test has been around for 6 months. And it works fine on various Linux, Windows and OS X systems (this is the first time I hear of a problem). This strongly suggests that the bug is in clang: it produces faulty code somewhere.

If you want to debug this, the code is in writerperfect/source/common/WPXSvInputStream.cxx. You need to determine why the substream is created empty or why the isEnd() test thinks it is empty... Relevant functions are WPXSvInputStreamImpl::getSubStreamByName (which ultimately leads to ZipStorageImpl::getStream) and WPXSvInputStreamImpl::isEnd.
Comment 3 Luke 2014-11-16 21:31:04 UTC
It looks like this is a bug with the version of clang that was shipped with Ubuntu 14.10. I resolved this issue by using the stable version of clang from here:

No errors building with 
$ clang --version
Ubuntu clang version 3.5-1ubuntu1 (trunk) (based on LLVM 3.5)
Target: i386-pc-linux-gnu