[Libreoffice-commits] core.git: external/hunspell
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Oct 25 11:22:03 UTC 2018
external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-and-an.patch | 13 +++++-----
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 749ef30c823e595f42e9844fb438441250389a0a
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Oct 25 10:18:03 2018 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Oct 25 13:21:37 2018 +0200
Fix external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-...
...introduced with b691e5824a6346d2fe7f702b5280b56532a2f89e "tdf#118162 spell
checking: fix freezing and add missing OCONV", leaving
HunspellImpl::suggest_internal's newly introduced out-parameters uninitialized
when the function returns early, causing HunspellImpl::suggest to use capwords
uninitialized, as seen when invoking spell-checking in LO built with UBSan:
> hunspell.cxx:907:7: runtime error: load of value 160, which is not a valid value for type 'bool'
> #0 in HunspellImpl::suggest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/hunspell/src/hunspell/hunspell.cxx:907:7 (instdir/program/../program/libspelllo.so +0x288ccd)
> #1 in Hunspell::suggest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/hunspell/src/hunspell/hunspell.cxx:888:18 (instdir/program/../program/libspelllo.so +0x288693)
> #2 in SpellChecker::GetProposals(rtl::OUString const&, com::sun::star::lang::Locale const&) at lingucomponent/source/spellcheck/spell/sspellimp.cxx:467:56 (instdir/program/../program/libspelllo.so +0x202913)
> #3 in SpellChecker::spell(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lingucomponent/source/spellcheck/spell/sspellimp.cxx:520:17 (instdir/program/../program/libspelllo.so +0x203b84)
> #4 in non-virtual thunk to SpellChecker::spell(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lingucomponent/source/spellcheck/spell/sspellimp.cxx (instdir/program/../program/libspelllo.so +0x203e62)
> #5 in SpellCheckerDispatcher::spell_Impl(rtl::OUString const&, o3tl::strong_int<unsigned short, LanguageTypeTag>, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at linguistic/source/spelldsp.cxx:484:44 (instdir/program/liblnglo.so +0x672505)
> #6 in SpellCheckerDispatcher::spell(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at linguistic/source/spelldsp.cxx:227:12 (instdir/program/liblnglo.so +0x670040)
> #7 in SpellCheckerDispatcher::spell(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at linguistic/source/spelldsp.cxx:768:12 (instdir/program/liblnglo.so +0x67b353)
> #8 in non-virtual thunk to SpellCheckerDispatcher::spell(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at linguistic/source/spelldsp.cxx (instdir/program/liblnglo.so +0x67b538)
> #9 in Thesaurus::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lingucomponent/source/thesaurus/libnth/nthesimp.cxx:433:27 (instdir/program/../program/liblnthlo.so +0x88315)
> #10 in non-virtual thunk to Thesaurus::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lingucomponent/source/thesaurus/libnth/nthesimp.cxx (instdir/program/../program/liblnthlo.so +0x8a322)
> #11 in ThesaurusDispatcher::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at linguistic/source/thesdsp.cxx:181:40 (instdir/program/liblnglo.so +0x6b6fa5)
> #12 in non-virtual thunk to ThesaurusDispatcher::queryMeanings(rtl::OUString const&, com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at linguistic/source/thesdsp.cxx (instdir/program/liblnglo.so +0x6b7ca2)
> #13 in ThesaurusMenuController::getMeanings(std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >&, rtl::OUString const&, com::sun::star::lang::Locale const&, unsigned long) at framework/source/uielement/thesaurusmenucontroller.cxx:117:31 (instdir/program/../program/libfwklo.so +0x1be1a9a)
> #14 in ThesaurusMenuController::fillPopupMenu() at framework/source/uielement/thesaurusmenucontroller.cxx:75:5 (instdir/program/../program/libfwklo.so +0x1bdf973)
> #15 in ThesaurusMenuController::statusChanged(com::sun::star::frame::FeatureStateEvent const&) at framework/source/uielement/thesaurusmenucontroller.cxx:63:9 (instdir/program/../program/libfwklo.so +0x1bdf24d)
> #16 in SfxDispatchController_Impl::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) at sfx2/source/control/unoctitm.cxx:861:16 (instdir/program/libsfxlo.so +0x2b6851f)
> #17 in SfxOfficeDispatch::addStatusListener(com::sun::star::uno::Reference<com::sun::star::frame::XStatusListener> const&, com::sun::star::util::URL const&) at sfx2/source/control/unoctitm.cxx:249:16 (instdir/program/libsfxlo.so +0x2b671d4)
> #18 in svt::PopupMenuControllerBase::updateCommand(rtl::OUString const&) at svtools/source/uno/popupmenucontrollerbase.cxx:189:20 (instdir/program/libsvtlo.so +0x2b0ef9e)
> #19 in svt::PopupMenuControllerBase::updatePopupMenu() at svtools/source/uno/popupmenucontrollerbase.cxx:173:5 (instdir/program/libsvtlo.so +0x2b0e66f)
> #20 in svt::PopupMenuControllerBase::setPopupMenu(com::sun::star::uno::Reference<com::sun::star::awt::XPopupMenu> const&) at svtools/source/uno/popupmenucontrollerbase.cxx:357:5 (instdir/program/libsvtlo.so +0x2b13e92)
> #21 in framework::MenuBarManager::CreatePopupMenuController(framework::MenuBarManager::MenuItemHandler*) at framework/source/uielement/menubarmanager.cxx:984:31 (instdir/program/../program/libfwklo.so +0x1a9ff7e)
> #22 in framework::MenuBarManager::Activate(Menu*) at framework/source/uielement/menubarmanager.cxx:737:50 (instdir/program/../program/libfwklo.so +0x1a94daa)
> #23 in framework::MenuBarManager::LinkStubActivate(void*, Menu*) at framework/source/uielement/menubarmanager.cxx:605:1 (instdir/program/../program/libfwklo.so +0x1a8f150)
> #24 in Link<Menu*, bool>::Call(Menu*) const at include/tools/link.hxx:84:45 (instdir/program/libvcllo.so +0x3bda2ae)
> #25 in Menu::Activate() at vcl/source/window/menu.cxx:269:28 (instdir/program/libvcllo.so +0x3b75b01)
> #26 in PopupMenu::ImplExecute(VclPtr<vcl::Window> const&, tools::Rectangle const&, FloatWinPopupFlags, Menu*, bool) at vcl/source/window/menu.cxx:2849:5 (instdir/program/libvcllo.so +0x3bcc12e)
> #27 in PopupMenu::Execute(vcl::Window*, tools::Rectangle const&, PopupMenuFlags) at vcl/source/window/menu.cxx:2788:12 (instdir/program/libvcllo.so +0x3bc95d6)
> #28 in PopupMenu::Execute(vcl::Window*, Point const&) at vcl/source/window/menu.cxx:2763:12 (instdir/program/libvcllo.so +0x3bc8c20)
> #29 in SfxDispatcher::ExecutePopup(rtl::OUString const&, vcl::Window*, Point const*) at sfx2/source/control/dispatch.cxx:1857:23 (instdir/program/libsfxlo.so +0x27980ec)
> #30 in SfxDispatcher::ExecutePopup(vcl::Window*, Point const*) at sfx2/source/control/dispatch.cxx:1806:19 (instdir/program/libsfxlo.so +0x279500f)
> #31 in SwEditWin::Command(CommandEvent const&) at sw/source/uibase/docvw/edtwin.cxx:5224:25 (instdir/program/../program/libswlo.so +0xd546dd0)
> #32 in ImplCallCommand(VclPtr<vcl::Window> const&, CommandEventId, void const*, bool, Point const*) at vcl/source/window/winproc.cxx:228:17 (instdir/program/libvcllo.so +0x4283a3c)
> #33 in ImplHandleMouseEvent(VclPtr<vcl::Window> const&, MouseNotifyEvent, bool, long, long, unsigned long, unsigned short, MouseEventModifiers) at vcl/source/window/winproc.cxx:792:34 (instdir/program/libvcllo.so +0x427e12e)
> #34 in ImplHandleSalMouseButtonDown(vcl::Window*, SalMouseEvent const*) at vcl/source/window/winproc.cxx:1982:12 (instdir/program/libvcllo.so +0x429c206)
> #35 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2316:20 (instdir/program/libvcllo.so +0x4296785)
> #36 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:280:29 (instdir/program/libvclplug_gtk3lo.so +0xb9badd)
> #37 in GtkSalFrame::CallCallbackExc(SalEvent, void const*) const at vcl/unx/gtk3/gtk3gtkframe.cxx:4477:16 (instdir/program/libvclplug_gtk3lo.so +0xb139f3)
> #38 in GtkSalFrame::signalButton(_GtkWidget*, _GdkEventButton*, void*) at vcl/unx/gtk3/gtk3gtkframe.cxx:2690:16 (instdir/program/libvclplug_gtk3lo.so +0xb2f96e)
> #39 in _gtk_marshal_BOOLEAN__BOXED at /usr/src/debug/gtk3-3.24.1-1.fc29.x86_64/gtk/gtkmarshalers.c:83:14 (/lib64/libgtk-3.so.0 +0x3e16fa)
[...]
Change-Id: I613bf37ded8c525301297d96e0d33826c9a48215
Reviewed-on: https://gerrit.libreoffice.org/62345
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: Jenkins
diff --git a/external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-and-an.patch b/external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-and-an.patch
index 7c9b255abe74..d4d822f92185 100644
--- a/external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-and-an.patch
+++ b/external/hunspell/0001-recent-Hunspell-fixes-for-suggestion-spelling-and-an.patch
@@ -574,33 +574,34 @@ index d6e871f..0dcd748 100644
// output conversion
RepList* rl = (pAMgr) ? pAMgr->get_oconvtable() : NULL;
if (rl) {
-@@ -902,7 +979,8 @@ std::vector<std::string> HunspellImpl::suggest(const std::string& word) {
+@@ -902,7 +979,12 @@ std::vector<std::string> HunspellImpl::suggest(const std::string& word) {
return slst;
}
-std::vector<std::string> HunspellImpl::suggest_internal(const std::string& word) {
+std::vector<std::string> HunspellImpl::suggest_internal(const std::string& word,
+ bool& capwords, size_t& abbv, int& captype) {
++ captype = NOCAP;
++ abbv = 0;
++ capwords = false;
++
std::vector<std::string> slst;
int onlycmpdsug = 0;
-@@ -920,8 +998,8 @@ std::vector<std::string> HunspellImpl::suggest_internal(const std::string& word)
+@@ -920,8 +998,6 @@ std::vector<std::string> HunspellImpl::suggest_internal(const std::string& word)
if (word.size() >= MAXWORDLEN)
return slst;
}
- int captype = NOCAP;
- size_t abbv = 0;
-+ captype = NOCAP;
-+ abbv = 0;
size_t wl = 0;
std::string scw;
-@@ -942,9 +1020,13 @@ std::vector<std::string> HunspellImpl::suggest_internal(const std::string& word)
+@@ -942,9 +1020,12 @@ std::vector<std::string> HunspellImpl::suggest_internal(const std::string& word)
return slst;
}
- int capwords = 0;
-+ capwords = false;
bool good = false;
+ HUNSPELL_THREAD_LOCAL clock_t timelimit;
More information about the Libreoffice-commits
mailing list