Bug ID: 115657
           Summary: LibreOfficeKit: libreofficekit_hook_2 does not handle
                    C++ exceptions
           Product: LibreOffice
           Version: release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice

LibreOfficeKit advertises a C API. But when an API consumer calls e.g.
lok_init_2() in libreofficekit/src/include/LibreOfficeKit/LibreOfficeKitInit.h,
LibreOffice does not catch C++ exceptions before crossing the FFI boundary.

#0  0x00007fffef9e1b20 in __cxxabiv1::__cxa_throw(void*, std::type_info*, void
(*)(void*)) (obj=0x7fffddc32b20, tinfo=0x7ffff63fb810 <typeinfo for
com::sun::star::uno::RuntimeException>, dest=0x7fffecad60b0)
    at /build/gcc/src/gcc/libstdc++-v3/libsupc++/
#1  0x00007fffecad9f2b in xmlreader::XmlReader::XmlReader(rtl::OUString const&)
() at /usr/lib/libreoffice/program/
#2  0x00007fffdd7b165c in  () at
#3  0x00007fffdd797541 in  () at
#4  0x00007fffdd797dfd in  () at
#5  0x00007fffdd7991da in  () at
#6  0x00007fffdd79ba3f in  () at
#7  0x00007fffdd79c30f in  () at
#8  0x00007fffdd7a03aa in  () at
#9  0x00007ffff06cca35 in  () at /usr/lib/libreoffice/program/
#10 0x00007ffff06cd63a in  () at /usr/lib/libreoffice/program/
#11 0x00007ffff06bd0ab in utl::ConfigItem::ConfigItem(rtl::OUString const&,
ConfigItemMode) () at /usr/lib/libreoffice/program/
#12 0x00007ffff072d677 in  () at /usr/lib/libreoffice/program/
#13 0x00007ffff072ece6 in SvtSysLocaleOptions::SvtSysLocaleOptions() () at
#14 0x00007ffff61c5295 in  () at /usr/lib/libreoffice/program/
#15 0x00007ffff61c5bb6 in libreofficekit_hook_2 () at

Actual Results:  
Undefined behavior in caller upon error.

Expected Results:
Errors are handled.

Reproducible: Always

User Profile Reset: No

Additional Info:
Build ID: 6.0.1-1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101

You are receiving this mail because:
You are the assignee for the bug.
Libreoffice-bugs mailing list

Reply via email to