Bug 61627 - Libreoffice compilation fails with enabled -flto
Summary: Libreoffice compilation fails with enabled -flto
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-28 18:47 UTC by Martin Liška
Modified: 2015-09-04 03:00 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Test failure dump (11.31 KB, application/x-bzip)
2013-05-29 15:59 UTC, Martin Liška
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2013-02-28 18:47:54 UTC
Hello, I tried to compile latest libreoffice with latest gcc compiler having following failure:

`_ZN7GString10getCStringEv' referenced in section `.text' of ../splash/libsplash.a(SplashFontFile.o): defined in discarded section `.gnu.linkonce.t._ZN7GString10getCStringEv' of GString.o (symbol from plugin)
collect2: error: ld returned 1 exit status

Looks like discarded symbol, so I fixed ./workdir/unxlngx6.pro/UnpackedTarball/xpdf/goo/GString.h by adding __attribute__ ((used)), but the modification didn't work. I face still the same problem.

CC=/home/marxin/Programming/gcc-mainline/bin/gcc CXX=/home/marxin/Programming/gcc-mainline/bin/g++ CFLAGS="-flto" CXXFLAGS="-flto" LDFLAGS="-flto" ./autogen.sh --with-parallelism=8 --without-junit

gcc --version:
g++ (GCC) 4.8.0 20130113 (experimental)

git log
commit 4626cda96af778ee34599f572567cfbc89d06983
Author: David Verrier <dverrier@gmail.com>
Date:   Thu Feb 28 14:55:08 2013 +0100

Thank you,
Martin
Comment 1 Martin Liška 2013-03-01 09:58:34 UTC
I updated my configure options that helped me to solve the problem.

new configure:
export LD_LIBRARY_PATH=/home/marxin/Programming/gcc-mainline/lib64:$LD_LIBRARY_PATH; CC=/home/marxin/Programming/gcc-mainline/bin/gcc CXX=/home/marxin/Programming/gcc-mainline/bin/g++ ./autogen.sh --with-parallelism=8 --without-junit --enable-mergelibs --enable-lto

Unfortunatelly I encounter new stuff:

[build CXX] svl/source/items/imageitm.cxx
/tmp/cc8sQZYR.ltrans0.ltrans.o:(.bss._ZN3com3sun4star3uno8SequenceIaE7s_pTypeE[_ZN3com3sun4star3uno8SequenceIaE7s_pTypeE]+0x0): multiple definition of `com::sun::star::uno::Sequence<signed char>::s_pType'
/home/marxin/Programming/libreoffice-lto/workdir/unxlngx6.pro/CxxObject/binaryurp/qa/test-unmarshal.o:(.bss._ZN3com3sun4star3uno8SequenceIaE7s_pTypeE[_ZN3com3sun4star3uno8SequenceIaE7s_pTypeE]+0x0): first defined here
collect2: error: ld returned 1 exit status

find -name Sequence.h
./cppu/inc/com/sun/star/uno/Sequence.h
./solver/unxlngx6.pro/inc/com/sun/star/uno/Sequence.h
./workdir/unxlngx6.pro/Zip/cppu_odk_headers/include/com/sun/star/uno/Sequence.h

Looks like first definition is a different file then Sequence.h
Comment 2 Michael Meeks 2013-03-01 10:07:14 UTC
Hi there,

This looks like it's going to be a -really- common problem.

find -name Sequence.h
./cppu/inc/com/sun/star/uno/Sequence.h

The code inside 'cppu' will be compiled against this header; the header is then 'installed' into the workdir & solver:

./solver/unxlngx6.pro/inc/com/sun/star/uno/Sequence.h
./workdir/unxlngx6.pro/Zip/cppu_odk_headers/include/com/sun/star/uno/Sequence.h

> Looks like first definition is a different file then Sequence.h

So - in fact the definitions -should- be identical; is there really a need for the compiler to bail on that ?

On the more positive front; Bjoern has some sort of plan to remove the 'workdir' and 'solver' pieces of this.

I -suspect- that we -could- re-jig the 'make' installation rules such that the headers were installed first to the solver, and then we compiled against them there instead - if that helps.

That would involve some hackery in solenv/gnumake/ I suspect - thoughts Bjoern ?
Comment 3 Björn Michaelsen 2013-03-01 11:15:33 UTC
well, this workdir version of the file will likely remain as it seems to be put there for packing up in an ODK zip file (so it is essentially only there for packaging). That file should never be used by a compiler anyway (if it is, I would consider that a bug).

As for getting rid of 'delivered' static headers in solver: Yes, thats something we should do and can do now rather easily -- it would change our build tree quite a bit though. We would:
 - move all the 'public' static headers that are visible in all of LibreOffice (and not only in one module) from $SRCDIR/$module/inc/$module/* to an new $SRCDIR/inc/$module/* location on the toplevel
 - the module-private headers at $module/inc/* stay were they are
 - we add $SRCDIR/inc to the global include path, but keep $OUTDIR/inc also for now for generated headers (this might have a slight performance hit on preprocessing as there is one more include path to check for a file -- I hope this is barely noticeable even on ccached builds)
 - we get rid of all the 'Package_*.mk' targets in our build (likely making our null build some 1-2 seconds quicker ;) )
  
 - done

I see nothing blocking this anymore except a/ possibly some more work on merges b/ module headers move out of the module c/ therefore: change management/getting the buy-in of core devs

CCing mst, who also might have some thoughts on this (bug is derailed a bit -- splitting it into two?)
Comment 4 Michael Stahl (allotropia) 2013-03-01 11:49:28 UTC
this has already been discussed a year ago (but was delayed due to re-base).

http://comments.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/24833

my alternative proposal was this:

- module/inc contains the public headers of the module
- module/source/inc contains internal headers of the module
- put top-level dir in include path

advantage is that headers stay in modules, but would require changing
all "#include <module/foo>" to <module/inc/foo> ...
Comment 5 Björn Michaelsen 2013-03-02 13:39:35 UTC
(In reply to comment #4)
> this has already been discussed a year ago (but was delayed due to re-base).
> 
> http://comments.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/
> 24833
> 
> my alternative proposal was this:
> 
> - module/inc contains the public headers of the module
> - module/source/inc contains internal headers of the module
> - put top-level dir in include path
> 
> advantage is that headers stay in modules, but would require changing
> all "#include <module/foo>" to <module/inc/foo> ...

The possible problem with that is, it means that we put $(SRCDIR) in the include path, at which point anyone can include any file from anywhere, including the 'internal headers' in module/source/inc or even in some completely wild place in SRCDIR.

Im not that scared about that as the Hamburg RelEngs where, but I think it will happen quite a bit and unnoticed: It will not take long before the notion of a 'module' bitrotted away then -- OTOH the module concept is mostly artificial with gbuild anyway. But going for 'modules are an antiquated concept, lets get rid of them' is a completely different can of worms, and I dont want to open that one (yet).
Comment 6 Michael Stahl (allotropia) 2013-03-02 16:01:41 UTC
(In reply to comment #5)
> The possible problem with that is, it means that we put $(SRCDIR) in the
> include path, at which point anyone can include any file from anywhere,
> including the 'internal headers' in module/source/inc or even in some
> completely wild place in SRCDIR.

that is exactly the disadvantage of that approach.

but there is currently no way to prevent cyclic dependencies between
modules (which is a similar problem), and we will probably need
some "lint" tool to detect these anyway; the same tool could check
if there is some dependency from module A to a header in module B
which is not in the public B/inc directory.
Comment 7 Martin Liška 2013-03-27 11:08:52 UTC
I tried to pull the git repository, but LTO compilation fails on compiling saxparser, more precisely saxparse.o. As I can see such a file like SAXException.hpp is generated from SAXException.idl. I guess some __attribute__((used)) will be needed for that typeinfo?

[build LNK] Executable/saxparser
S=/home/marxin/Programming/libreoffice && O=$S/solver/unxlngx6.pro && W=$S/workdir/unxlngx6.pro &&  mkdir -p $W/LinkTarget/Executable/ && /usr/bin/ccache g++  -flto -fuse-linker-plugin -O2   -Wl,-z,origin '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN' -Wl,-rpath-link,$O/lib -Wl,-z,defs  -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc -L$O/lib  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -Wl,-O1 -Wl,-S  $W/CxxObject/i18npool/source/localedata/LocaleNode.o $W/CxxObject/i18npool/source/localedata/filewriter.o $W/CxxObject/i18npool/source/localedata/saxparser.o     -Wl,--start-group  -Wl,--end-group -Wl,--no-as-needed   -luno_cppu -luno_cppuhelpergcc3 -luno_sal -o $W/LinkTarget/Executable/saxparser
libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo for com::sun::star::uno::Exception'
libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo name for com::sun::star::uno::RuntimeException'
libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo for com::sun::star::uno::RuntimeException'
libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo name for com::sun::star::uno::Exception'
Comment 8 Matúš Kukan 2013-04-17 09:11:14 UTC
It should be better in current master.
At least for "me" ( tinderbox Raspbian-ARM_35 ) with --enable-mergelibs --with-system-boost ... lto works after http://cgit.freedesktop.org/libreoffice/core/commit/?id=a59565f855cb30fff56eb3d889376bfd27dc728f
scfilt and wpftdraw had problems with boost
frm with some undefined vtable symbol
Comment 9 Martin Liška 2013-05-18 17:16:07 UTC
I tried to do a compilation with latest libreoffice, but I still face the same problem:

S=/home/marxin/libreoffice && O=$S/solver/unxlngx6.pro && W=$S/workdir/unxlngx6.pro &&  mkdir -p $W/LinkTarget/Executable/ && g++  -flto -fno-fat-lto-objects -fuse-linker-plugin -O2   -Wl,-z,origin '-Wl,-rpath,$ORIGIN/../lib:$ORIGIN' -Wl,-rpath-link,$O/lib -Wl,-z,defs  -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc -L$O/lib  -Wl,--hash-style=gnu  -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions  -Wl,-O1 -Wl,-S  $W/CxxObject/i18npool/source/localedata/LocaleNode.o $W/CxxObject/i18npool/source/localedata/filewriter.o $W/CxxObject/i18npool/source/localedata/saxparser.o     -Wl,--start-group  -Wl,--end-group -Wl,--no-as-needed   -luno_cppu -luno_cppuhelpergcc3 -luno_sal -o $W/LinkTarget/Executable/saxparser
/home/marxin/libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo for com::sun::star::uno::Exception'
/home/marxin/libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo name for com::sun::star::uno::RuntimeException'
/home/marxin/libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo for com::sun::star::uno::RuntimeException'
/home/marxin/libreoffice/workdir/unxlngx6.pro/CxxObject/i18npool/source/localedata/saxparser.o (symbol from plugin): undefined reference to `typeinfo name for com::sun::star::uno::Exception'

There was a bug in GCC with weakrefs that blocked me. It was fixed by Jan on May 15 2013.

Could you please add '-fno-fat-lto-objects' to LTO flags:

b/solenv/gbuild/platform/com_GCC_defs.mk
gb_LTOFLAGS := -flto -fno-fat-lto-objects

libreoffice revision: 1f2555426a56b639ff430bf60fc4bd06d647ebaf
gcc --version: gcc (GCC) 4.9.0 20130515 (experimental)

My configure options:
./autogen.sh --with-parallelism=9 --without-junit --enable-mergelibs --enable-lto --with-system-boost --with-system-icu --with-system-cairo --disable-debug --disable-symbols --disable-cups
Comment 10 Martin Liška 2013-05-29 15:59:16 UTC
I was finally able to compile libreoffice, but seems that some unit test are corrupted:

/usr/bin/make -r -f /home/marxin/Programming/libreoffice-lto/Makefile.gbuild CppunitTest_sc_filters_test

[build CUT] sc_filters_test
S=/home/marxin/Programming/libreoffice-lto && O=$S/solver/unxlngx6.pro && W=$S/workdir/unxlngx6.pro &&  mkdir -p $W/CppunitTest/ &&   rm -fr $W/CppunitTest/sc_filters_test.test.core && mkdir $W/CppunitTest/sc_filters_test.test.core && cd $W/CppunitTest/sc_filters_test.test.core && (LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$O/lib:$S/instdir/unxlngx6.pro/program":$O/lib/sqlite   DBGSV_ERROR_OUT=shell DISABLE_SAL_DBGBOX=t     $O/bin/cppunit/cppunittester $W/LinkTarget/CppunitTest/libtest_sc_filters_test.so --headless "-env:BRAND_BASE_DIR=file://$O/unittest/install"   "-env:CONFIGURATION_LAYERS=xcsxcu:file://$O/xml/registry module:file://$O/xml/registry/spool"  "-env:UNO_TYPES=file://$O/bin/offapi.rdb file://$O/bin/udkapi.rdb"  "-env:UNO_SERVICES=file://$O/xml/ure/services.rdb file://$O/xml/component/basic/util/sb.component file://$O/xml/component/chart2/source/controller/chartcontroller.component file://$O/xml/component/chart2/source/chartcore.component file://$O/xml/component/comphelper/util/comphelp.component file://$O/xml/component/configmgr/source/configmgr.component file://$O/xml/component/dbaccess/util/dba.component file://$O/xml/component/embeddedobj/util/embobj.component file://$O/xml/component/eventattacher/source/evtatt.component file://$O/xml/component/fileaccess/source/fileacc.component file://$O/xml/component/filter/source/config/cache/filterconfig1.component file://$O/xml/component/forms/util/frm.component file://$O/xml/component/framework/util/fwk.component file://$O/xml/component/i18npool/util/i18npool.component file://$O/xml/component/linguistic/source/lng.component file://$O/xml/component/oox/util/oox.component file://$O/xml/component/package/source/xstor/xstor.component file://$O/xml/component/package/util/package2.component file://$O/xml/component/sax/source/expatwrap/expwrap.component file://$O/xml/component/sax/source/fastparser/fastsax.component file://$O/xml/component/sc/util/sc.component file://$O/xml/component/sc/util/scfilt.component file://$O/xml/component/scaddins/source/analysis/analysis.component file://$O/xml/component/scaddins/source/datefunc/date.component file://$O/xml/component/sfx2/util/sfx.component file://$O/xml/component/sot/util/sot.component file://$O/xml/component/svl/util/svl.component file://$O/xml/component/svx/util/svx.component file://$O/xml/component/svtools/util/svt.component file://$O/xml/component/toolkit/util/tk.component file://$O/xml/component/ucb/source/core/ucb1.component file://$O/xml/component/ucb/source/ucp/file/ucpfile1.component file://$O/xml/component/ucb/source/ucp/tdoc/ucptdoc1.component file://$O/xml/component/unotools/util/utl.component file://$O/xml/component/unoxml/source/rdf/unordf.component file://$O/xml/component/unoxml/source/service/unoxml.component file://$O/xml/component/xmloff/util/xo.component"  -env:URE_INTERNAL_LIB_DIR=file://$O/lib  -env:LO_LIB_DIR=file://$O/lib --protector unoexceptionprotector.so unoexceptionprotector --protector unobootstrapprotector.so unobootstrapprotector    > $W/CppunitTest/sc_filters_test.test.log 2>&1 || (RET=$? && cat $W/CppunitTest/sc_filters_test.test.log && printf '\nError: a unit test failed, please do one of:\n\nexport DEBUGCPPUNIT=TRUE            # for exception catching\nexport GDBCPPUNITTRACE="gdb --args" # for interactive debugging\nexport VALGRIND=memcheck            # for memory checking\n\nand retry using: make %sTest_%s\n\n' Cppunit sc_filters_test  && $S/solenv/bin/gdb-core-bt.sh $O/bin/cppunit/cppunittester $W/CppunitTest/sc_filters_test.test.core $RET && false))
/bin/sh: line 1: 13331 Segmentation fault      LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$O/lib:$S/instdir/unxlngx6.pro/program":$O/lib/sqlite DBGSV_ERROR_OUT=shell DISABLE_SAL_DBGBOX=t $O/bin/cppunit/cppunittester $W/LinkTarget/CppunitTest/libtest_sc_filters_test.so --headless "-env:BRAND_BASE_DIR=file://$O/unittest/install" "-env:CONFIGURATION_LAYERS=xcsxcu:file://$O/xml/registry module:file://$O/xml/registry/spool" "-env:UNO_TYPES=file://$O/bin/offapi.rdb file://$O/bin/udkapi.rdb" "-env:UNO_SERVICES=file://$O/xml/ure/services.rdb file://$O/xml/component/basic/util/sb.component file://$O/xml/component/chart2/source/controller/chartcontroller.component file://$O/xml/component/chart2/source/chartcore.component file://$O/xml/component/comphelper/util/comphelp.component file://$O/xml/component/configmgr/source/configmgr.component file://$O/xml/component/dbaccess/util/dba.component file://$O/xml/component/embeddedobj/util/embobj.component file://$O/xml/component/eventattacher/source/evtatt.component file://$O/xml/component/fileaccess/source/fileacc.component file://$O/xml/component/filter/source/config/cache/filterconfig1.component file://$O/xml/component/forms/util/frm.component file://$O/xml/component/framework/util/fwk.component file://$O/xml/component/i18npool/util/i18npool.component file://$O/xml/component/linguistic/source/lng.component file://$O/xml/component/oox/util/oox.component file://$O/xml/component/package/source/xstor/xstor.component file://$O/xml/component/package/util/package2.component file://$O/xml/component/sax/source/expatwrap/expwrap.component file://$O/xml/component/sax/source/fastparser/fastsax.component file://$O/xml/component/sc/util/sc.component file://$O/xml/component/sc/util/scfilt.component file://$O/xml/component/scaddins/source/analysis/analysis.component file://$O/xml/component/scaddins/source/datefunc/date.component file://$O/xml/component/sfx2/util/sfx.component file://$O/xml/component/sot/util/sot.component file://$O/xml/component/svl/util/svl.component file://$O/xml/component/svx/util/svx.component file://$O/xml/component/svtools/util/svt.component file://$O/xml/component/toolkit/util/tk.component file://$O/xml/component/ucb/source/core/ucb1.component file://$O/xml/component/ucb/source/ucp/file/ucpfile1.component file://$O/xml/component/ucb/source/ucp/tdoc/ucptdoc1.component file://$O/xml/component/unotools/util/utl.component file://$O/xml/component/unoxml/source/rdf/unordf.component file://$O/xml/component/unoxml/source/service/unoxml.component file://$O/xml/component/xmloff/util/xo.component" -env:URE_INTERNAL_LIB_DIR=file://$O/lib -env:LO_LIB_DIR=file://$O/lib --protector unoexceptionprotector.so unoexceptionprotector --protector unobootstrapprotector.so unobootstrapprotector > $W/CppunitTest/sc_filters_test.test.log 2>&1
File tested,Test Result,Execution Time (ms)
file:///home/marxin/Programming/libreoffice-lto/sc/qa/unit/data/qpro/pass/CVE-2007-5745-1.wb2,Fail,35

Debug output after I enabled DEBUGCPPPRINT was added as an attachment.
Comment 11 Martin Liška 2013-05-29 15:59:49 UTC
Created attachment 79976 [details]
Test failure dump
Comment 12 Michael Meeks 2013-05-30 09:21:47 UTC
Hi Martin,

My expectation is that you'd be able to look at these issues - which (I assume) only arrive when linking with LTO & are therefore not really LibreOffice bugs.

To get a gdb closer to the issue do:

export GDBCPPUNITTRACE="gdb --args" # for interactive debugging

And re-run the make:

cd sc; make /home/marxin/Programming/libreoffice-lto/workdir/unxlngx6.pro/CppunitTest/sc_filters_test.test

Type 'run' in gdb - of course, and wait for the crash; then I guess it's a matter of poking around to work out what mis-compilation / mis-optimisation happened (?) :-)

That is assuming that this is not a side-effect of libmerged somehow - but increasingly distros are building / shipping with that - so I don't expect huge issues there.

HTH !
Comment 13 Martin Liška 2013-06-10 23:09:41 UTC
There's a bug that is comming from libmergedlo.so. Do you have ideas what could be wrong?

/usr/bin/make -j 9 -rs -f /home/marxin/Programming/libreoffice-lto-test/Makefile.gbuild CppunitTest_sd_filters_test

[build CUT] sd_filters_test
/bin/sh: line 1:  5096 Killed                  LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$O/lib:$S/instdir/unxlngx6.pro/program":$O/lib/sqlite G_SLICE=always-malloc GLIBCXX_FORCE_NEW=1 DBGSV_ERROR_OUT=shell DISABLE_SAL_DBGBOX=t valgrind --tool=memcheck --num-callers=50 --error-exitcode=1 --trace-children=yes --leak-check=no $O/bin/cppunit/cppunittester $W/LinkTarget/CppunitTest/libtest_sd_filters_test.so --headless "-env:BRAND_BASE_DIR=file://$O/unittest/install" "-env:CONFIGURATION_LAYERS=xcsxcu:file://$O/xml/registry module:file://$O/xml/registry/spool" "-env:UNO_TYPES=file://$O/bin/offapi.rdb file://$O/bin/udkapi.rdb" "-env:UNO_SERVICES=file://$O/xml/ure/services.rdb file://$O/xml/component/animations/source/animcore/animcore.component file://$O/xml/component/basic/util/sb.component file://$O/xml/component/comphelper/util/comphelp.component file://$O/xml/component/configmgr/source/configmgr.component file://$O/xml/component/dbaccess/util/dba.component file://$O/xml/component/embeddedobj/util/embobj.component file://$O/xml/component/fileaccess/source/fileacc.component file://$O/xml/component/filter/source/config/cache/filterconfig1.component file://$O/xml/component/framework/util/fwk.component file://$O/xml/component/i18npool/util/i18npool.component file://$O/xml/component/linguistic/source/lng.component file://$O/xml/component/oox/util/oox.component file://$O/xml/component/package/source/xstor/xstor.component file://$O/xml/component/package/util/package2.component file://$O/xml/component/sax/source/expatwrap/expwrap.component file://$O/xml/component/sax/source/fastparser/fastsax.component file://$O/xml/component/sd/util/sd.component file://$O/xml/component/sd/util/sdfilt.component file://$O/xml/component/sfx2/util/sfx.component file://$O/xml/component/sot/util/sot.component file://$O/xml/component/svtools/util/svt.component file://$O/xml/component/toolkit/util/tk.component file://$O/xml/component/ucb/source/core/ucb1.component file://$O/xml/component/ucb/source/ucp/file/ucpfile1.component file://$O/xml/component/ucb/source/ucp/tdoc/ucptdoc1.component file://$O/xml/component/unotools/util/utl.component file://$O/xml/component/unoxml/source/rdf/unordf.component file://$O/xml/component/unoxml/source/service/unoxml.component file://$O/xml/component/xmloff/util/xo.component" -env:URE_INTERNAL_LIB_DIR=file://$O/lib -env:LO_LIB_DIR=file://$O/lib --protector unoexceptionprotector.so unoexceptionprotector --protector unobootstrapprotector.so unobootstrapprotector > $W/CppunitTest/sd_filters_test.test.log 2>&1
==5096== Memcheck, a memory error detector
==5096== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==5096== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==5096== Command: /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester /home/marxin/Programming/libreoffice-lto-test/workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_sd_filters_test.so --headless -env:BRAND_BASE_DIR=file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/unittest/install -env:CONFIGURATION_LAYERS=xcsxcu:file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/registry\ module:file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/registry/spool -env:UNO_TYPES=file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/offapi.rdb\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/udkapi.rdb -env:UNO_SERVICES=file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/ure/services.rdb\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/animations/source/animcore/animcore.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/basic/util/sb.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/comphelper/util/comphelp.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/configmgr/source/configmgr.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/dbaccess/util/dba.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/embeddedobj/util/embobj.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/fileaccess/source/fileacc.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/filter/source/config/cache/filterconfig1.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/framework/util/fwk.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/i18npool/util/i18npool.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/linguistic/source/lng.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/oox/util/oox.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/package/source/xstor/xstor.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/package/util/package2.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/sax/source/expatwrap/expwrap.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/sax/source/fastparser/fastsax.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/sd/util/sd.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/sd/util/sdfilt.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/sfx2/util/sfx.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/sot/util/sot.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/svtools/util/svt.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/toolkit/util/tk.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/ucb/source/core/ucb1.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/ucb/source/ucp/file/ucpfile1.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/ucb/source/ucp/tdoc/ucptdoc1.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/unotools/util/utl.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/unoxml/source/rdf/unordf.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/unoxml/source/service/unoxml.component\ file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/xml/component/xmloff/util/xo.component -env:URE_INTERNAL_LIB_DIR=file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib -env:LO_LIB_DIR=file:///home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib --protector unoexceptionprotector.so unoexceptionprotector --protector unobootstrapprotector.so unobootstrapprotector
==5096== 
==5096== Invalid read of size 8
==5096==    at 0x93D0100: SotObject::SotObject() (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libmergedlo.so)
==5096==    by 0xBE80AF1: sd::DrawDocShell::DrawDocShell(unsigned long, unsigned char, DocumentType) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libsdlo.so)
==5096==    by 0xBE80C50: SdPresentationDocument_createInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, unsigned long) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libsdlo.so)
==5096==    by 0x91F33BB: sfx2::SfxModelFactory::createInstanceWithArguments(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libmergedlo.so)
==5096==    by 0x8E32024: sfx2::SfxModelFactory::createInstance() (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libmergedlo.so)
==5096==    by 0x62A69A1: cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libuno_cppuhelpergcc3.so.3)
==5096==    by 0x62422D3: cppuhelper::ServiceManager::createInstance(rtl::OUString const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libuno_cppuhelpergcc3.so.3)
==5096==    by 0x41F3C3B: SdFiltersTest::setUp() (in /home/marxin/Programming/libreoffice-lto-test/workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_sd_filters_test.so)
==5096==    by 0x40E814D: CppUnit::TestCaseMethodFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E33B0: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x412280F: (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/unoexceptionprotector.so)
==5096==    by 0x40E33B0: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40DA015: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E33B0: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E325A: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F2739: CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E7B55: CppUnit::TestCase::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E8811: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E869B: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E8811: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E869B: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F6877: CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F2517: CppUnit::TestResult::runTest(CppUnit::Test*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F6AC7: CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x4026A9: (anonymous namespace)::ProtectedFixtureFunctor::run() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester)
==5096==    by 0x402B26: sal_main() (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester)
==5096==    by 0x40226A: main (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester)
==5096==  Address 0x30 is not stack'd, malloc'd or (recently) free'd
==5096== 
==5096== 
==5096== Process terminating with default action of signal 11 (SIGSEGV)
==5096==  Access not within mapped region at address 0x30
==5096==    at 0x93D0100: SotObject::SotObject() (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libmergedlo.so)
==5096==    by 0xBE80AF1: sd::DrawDocShell::DrawDocShell(unsigned long, unsigned char, DocumentType) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libsdlo.so)
==5096==    by 0xBE80C50: SdPresentationDocument_createInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&, unsigned long) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libsdlo.so)
==5096==    by 0x91F33BB: sfx2::SfxModelFactory::createInstanceWithArguments(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libmergedlo.so)
==5096==    by 0x8E32024: sfx2::SfxModelFactory::createInstance() (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libmergedlo.so)
==5096==    by 0x62A69A1: cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libuno_cppuhelpergcc3.so.3)
==5096==    by 0x62422D3: cppuhelper::ServiceManager::createInstance(rtl::OUString const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libuno_cppuhelpergcc3.so.3)
==5096==    by 0x41F3C3B: SdFiltersTest::setUp() (in /home/marxin/Programming/libreoffice-lto-test/workdir/unxlngx6.pro/LinkTarget/CppunitTest/libtest_sd_filters_test.so)
==5096==    by 0x40E814D: CppUnit::TestCaseMethodFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E33B0: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x412280F: (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/unoexceptionprotector.so)
==5096==    by 0x40E33B0: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40DA015: CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E33B0: CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E325A: CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F2739: CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E7B55: CppUnit::TestCase::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E8811: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E869B: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E8811: CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40E869B: CppUnit::TestComposite::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F6877: CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F2517: CppUnit::TestResult::runTest(CppUnit::Test*) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x40F6AC7: CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/lib/libcppunit-1.13.so.0)
==5096==    by 0x4026A9: (anonymous namespace)::ProtectedFixtureFunctor::run() const (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester)
==5096==    by 0x402B26: sal_main() (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester)
==5096==    by 0x40226A: main (in /home/marxin/Programming/libreoffice-lto-test/solver/unxlngx6.pro/bin/cppunit/cppunittester)
==5096==  If you believe this happened as a result of a stack
==5096==  overflow in your program's main thread (unlikely but
==5096==  possible), you can try to increase the size of the
==5096==  main thread stack using the --main-stacksize= flag.
==5096==  The main thread stack size used in this run was 16777216.
==5096== 
==5096== HEAP SUMMARY:
==5096==     in use at exit: 9,760,467 bytes in 136,368 blocks
==5096==   total heap usage: 186,509 allocs, 50,141 frees, 15,853,662 bytes allocated
==5096== 
==5096== For a detailed leak analysis, rerun with: --leak-check=full
==5096== 
==5096== For counts of detected and suppressed errors, rerun with: -v
==5096== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
Comment 14 Michael Meeks 2013-06-11 08:05:47 UTC
> There's a bug that is comming from libmergedlo.so. Do you have
> ideas what could be wrong?

Does the bug occur if you are using libmerged, but without LTO ? if so - it is a bug in the LTO and your issue to investigate (I guess) :-) It would help to configure with --enable-symbols to get more helpful backtraces [ assuming you can link in linear time with that ].
Comment 15 Julien Nabet 2014-12-20 18:37:03 UTC
Any update here following last Michael's comment (+ latest master sources)?
Comment 16 QA Administrators 2015-07-18 17:35:39 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team

This NEEDINFO message was generated on: 2015-07-18
Comment 17 QA Administrators 2015-09-04 03:00:57 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided):

a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. 
Please do not:
a) respond via email 
b) update the version field in the bug or any of the other details on the top section of FDO
Message generated on: 2015-09-03