[Libreoffice-bugs] [Bug 126442] New: LTO build segfaults in sw_apitests

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jul 17 12:52:03 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=126442

            Bug ID: 126442
           Summary: LTO build segfaults in sw_apitests
           Product: LibreOffice
           Version: 6.3.0.1 rc
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: tomas.chvatal at gmail.com

[ 2207s] /bin/sh: line 1: 1289977 Segmentation fault      (core dumped) (
MAX_CONCURRENCY=4 MOZILLA_CERTIFICATE_FOLDER=
SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 SAL_USE_VCLPLUGIN=svp
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs
MALLOC_CHECK_=2 MALLOC_PERTURB_=153 $W/LinkTarget/Executable/cppunittester
$W/LinkTarget/CppunitTest/libtest_sw_apitests.so --headless
"-env:BRAND_BASE_DIR=file://$S/instdir" "-env:BRAND_SHARE_SUBDIR=share"
"-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource"
"-env:UserInstallation=file://$W/CppunitTest/sw_apitests.test.user"
"-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry
xcsxcu:file://$W/unittest/registry"
"-env:UNO_TYPES=file://$I/program/types/offapi.rdb file://$I/program/types.rdb"
"-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb file://$W/Rdb/services.rdb"
-env:URE_INTERNAL_LIB_DIR=file://$I/program -env:LO_LIB_DIR=file://$I/program
-env:LO_JAVA_DIR=file://$I/program/classes --protector
$W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector
--protector $W/LinkTarget/Library/unobootstrapprotector.so
unobootstrapprotector --protector
$W/LinkTarget/Library/libvclbootstrapprotector.so vclbootstrapprotector
"-env:CPPUNITTESTTARGET=$W/CppunitTest/sw_apitests.test" ) >
$W/CppunitTest/sw_apitests.test.log 2>&1


[ 2209s] (anonymous namespace)::SwXTextTable::testAddEventListener finished in:
256ms
[ 2209s] (anonymous namespace)::SwXTextTable::testRemoveEventListener finished
in: 97ms
[ 2209s] (anonymous namespace)::SwXTextTable::testDisposedByDesktopTerminate
finished in: 107ms
[ 2209s] 
[ 2209s] It looks like
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/workdir/LinkTarget/Executable/cppunittester
generated
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/workdir/CppunitTest/sw_apitests.test.core/core
[ 2209s] Backtraces:
[ 2209s] Program terminated with signal SIGSEGV, Segmentation fault.
[ 2209s] #0  0x00007f796129558c in
SfxObjectShell_Impl::SfxObjectShell_Impl(SfxObjectShell&) () from
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] warning: File
"/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libuno_sal.so.3-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
[ 2209s] To enable execution of this file add
[ 2209s]        add-auto-load-safe-path
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libuno_sal.so.3-gdb.py
[ 2209s] line to your configuration file "/home/abuild/.gdbinit".
[ 2209s] To completely disable this security protection add
[ 2209s]        set auto-load safe-path /
[ 2209s] line to your configuration file "/home/abuild/.gdbinit".
[ 2209s] For more information about this security protection see the
[ 2209s] "Auto-loading safe path" section in the GDB manual.  E.g., run from
the shell:
[ 2209s]        info "(gdb)Auto-loading safe path"
[ 2209s] warning: File
"/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libuno_cppu.so.3-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
[ 2209s] warning: File
"/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
[ 2209s] warning: File
"/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libswlo.so-gdb.py"
auto-loading has been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
[ 2209s] rax            0x0                 0
[ 2209s] rbx            0x56457e58ffb0      94856472494000
[ 2209s] rcx            0x0                 0
[ 2209s] rdx            0x0                 0
[ 2209s] rsi            0x56457e459540      94856471221568
[ 2209s] rdi            0x56457e5900d8      94856472494296
[ 2209s] rbp            0x56457e71c620      0x56457e71c620
[ 2209s] rsp            0x7fff05487230      0x7fff05487230
[ 2209s] r8             0x7f7961bb2b20      140159307426592
[ 2209s] r9             0x7e3               2019
[ 2209s] r10            0xa3d70a3d70a3d70b  -6640827866535438581
[ 2209s] r11            0x2ce33e6c02ce33e7  3234497591006606311
[ 2209s] r12            0x56457e58ffc0      94856472494016
[ 2209s] r13            0x56457e5900d8      94856472494296
[ 2209s] r14            0x0                 0
[ 2209s] r15            0x1                 1
[ 2209s] rip            0x7f796129558c      0x7f796129558c
<SfxObjectShell_Impl::SfxObjectShell_Impl(SfxObjectShell&)+524>
[ 2209s] eflags         0x10246             [ PF ZF IF RF ]
[ 2209s] cs             0x33                51
[ 2209s] ss             0x2b                43
[ 2209s] ds             0x0                 0
[ 2209s] es             0x0                 0
[ 2209s] fs             0x0                 0
[ 2209s] gs             0x0                 0
[ 2209s] 
[ 2209s] Thread 1 (Thread 0x7f7962b96740 (LWP 1289977)):
[ 2209s] #0  0x00007f796129558c in
SfxObjectShell_Impl::SfxObjectShell_Impl(SfxObjectShell&) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #1  0x00007f79612958b9 in
SfxObjectShell::SfxObjectShell(SfxModelFlags) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #2  0x00007f795b0d43f3 in SwDocShell::SwDocShell(SfxModelFlags) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libswlo.so
[ 2209s] #3  0x00007f795af3bab4 in
SwTextDocument_createInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
const&, SfxModelFlags) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libswlo.so
[ 2209s] #4  0x00007f7961274f36 in
sfx2::SfxModelFactory::createInstanceWithArguments(com::sun::star::uno::Sequence<com::sun::star::uno::Any>
const&) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #5  0x00007f79612650c4 in sfx2::SfxModelFactory::createInstance() ()
at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #6  0x00007f7962b0b137 in
cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, bool) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libuno_cppuhelpergcc3.so.3
[ 2209s] #7  0x00007f7962b0b1c7 in
cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
() at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libuno_cppuhelpergcc3.so.3
[ 2209s] #8  0x00007f796120dcd8 in (anonymous
namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&)
() at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #9  0x00007f7961738f37 in framework::LoadEnv::startLoading() () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #10 0x00007f796173b890 in
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader>
const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, rtl::OUString const&, rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #11 0x00007f79616fcfb2 in
framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString
const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) ()
at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/instdir/program/libmergedlo.so
[ 2209s] #12 0x00007f795a8bba8e in
unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/workdir/LinkTarget/CppunitTest/../Library/libunotest.so
[ 2209s] #13 0x00007f795bf50e02 in (anonymous namespace)::SwXTextField::init()
() at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/workdir/LinkTarget/CppunitTest/libtest_sw_apitests.so
[ 2209s] #14 0x00007f795a9e7491 in apitest::XComponent::testAddEventListener()
() at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/workdir/LinkTarget/CppunitTest/../Library/libsubsequenttest.so
[ 2209s] #15 0x00007f796314efa1 in  () at /usr/lib64/libcppunit-1.14.so.0
[ 2209s] #16 0x00007f7963174b43 in (anonymous
namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext
const&) () at
/home/abuild/rpmbuild/BUILD/libreoffice-6.3.0.1/workdir/LinkTarget/Library/unoexceptionprotector.so
[ 2209s] #17 0x00007f7963154252 in
CppUnit::DefaultProtector::protect(CppUnit::Functor const&,
CppUnit::ProtectorContext const&) () at /usr/lib64/libcppunit-1.14.so.0
[ 2209s] #18 0x00007f7963155935 in
CppUnit::ProtectorChain::protect(CppUnit::Functor const&,
CppUnit::ProtectorContext const&) () at /usr/lib64/libcppunit-1.14.so.0
[ 2209s] #19 0x00007f7963147d8a in
CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&) () at /usr/lib64/libcppunit-1.14.so.0
[ 2209s] #20 0x00007f7963152254 in CppUnit::TestCase::run(CppUnit::TestResult*)
() at /usr/lib64/libcppunit-1.14.so.0
[ 2209s] #21 0x00007f796314edd3 in
CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) () at
/usr/lib64/libcppunit-1.14.so.0
[ 2209s] #22 0x00007f796314eeb0 in
CppUnit::TestComposite::run(CppUnit::TestResult*) () at
/usr/lib64/libcppunit-1.14.so.0
[ 2209s] #23 0x00007f796314edd3 in
CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) () at
/usr/lib64/libcppunit-1.14.so.0
[ 2209s] #24 0x00007f796314eeb0 in
CppUnit::TestComposite::run(CppUnit::TestResult*) () at
/usr/lib64/libcppunit-1.14.so.0
[ 2209s] #25 0x00007f7963145f93 in CppUnit::TestResult::runTest(CppUnit::Test*)
() at /usr/lib64/libcppunit-1.14.so.0
[ 2209s] #26 0x00007f796314e7b1 in
CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) () at
/usr/lib64/libcppunit-1.14.so.0
[ 2209s] #27 0x000056457bce51c6 in (anonymous
namespace)::ProtectedFixtureFunctor::run() const ()
[ 2209s] #28 0x000056457bce6194 in sal_main() ()
[ 2209s] #29 0x000056457bce1b1c in main ()


Looks like the issue is in sw/qa/api/SwXTextField.cxx and hhe test is new in
6.3 (and master) 6.2 is building just fine.

Based on the trace there is null pointer dereference, but I am not sure what
should be initialized for it to be happy.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190717/84e059e2/attachment-0001.html>


More information about the Libreoffice-bugs mailing list