-
Stephan Bergmann yazdı
Our sal/cppunittester/cppunittester.cxx uses SAL_IMPLEMENT_MAIN, so forwards the cmd line args to osl_setCommandArgs. CppunitTest_libreofficekit_tiledrendering (run via that cppunittester) starts LOK, which starts SVMain on a lo_startmain thread, which calls deskopt::DispatchWatcher::executeDispatchRequests to process any cmd line arg requests to open documents. It sees the libtest_libreofficekit_tiledrendering.so (or .dylib/.dll) passed to cppunittester, and tries to open it as a LO document. Type detection will typically determine it is plain text that should be opened with Writer, which will succeed. But when the .so is built with GCC 6, it happens to be detected as a MacPaint document, loading which fails, so that executeDispatchRequests (desktop/source/app/dispatchwatcher.cxx) will call xDesktop->terminate(), which unwinds that lo_startmain thread (DeInitVCL etc.). But the main cppunittester thread is still calling into LOK, which is under the assumption that VCL etc. is still functional, and somewhat random crashes will happen. Change-Id: Ie7b00e797a0f3223b3942bb63a31aa9c44370247
4a5dda08