Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test SIGSEGV on i386 #4

Closed
zhsj opened this issue Mar 13, 2020 · 1 comment
Closed

test SIGSEGV on i386 #4

zhsj opened this issue Mar 13, 2020 · 1 comment

Comments

@zhsj
Copy link

zhsj commented Mar 13, 2020

https://buildd.debian.org/status/fetch.php?pkg=libime&arch=i386&ver=0.0%7Egit20200310.fdce632-1&stamp=1584041540&raw=0

Only failed on i386.

	  9 - testdecoder (SEGFAULT)
	 10 - testpinyincontext (Child aborted)
	 11 - testpinyindictionary (SEGFAULT)

For testdecoder, the backtrace is

(gdb) r
Starting program: /build/libime-Mbrauo/libime/build/test/testdecoder 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xf7d3aff1 in libime::DATriePrivate<float, true, 1>::suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, libime::DATriePrivate<float, true, 1>::npos_t) const () from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
(gdb) bt
#0  0xf7d3aff1 in libime::DATriePrivate<float, true, 1>::suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, libime::DATriePrivate<float, true, 1>::npos_t) const () from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#1  0xf7d370ff in libime::DATrie<float>::suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned long long) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#2  0xf7f2458a in libime::matchWordsOnTrie<libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const::{lambda(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, float)#2}>(libime::MatchedPinyinPath const&, libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const::{lambda(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, float)#2} const&)::{lambda(float, unsigned int, unsigned long long)#1}::operator()(float, unsigned int, unsigned long long) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#3  0xf7f24f76 in std::_Function_handler<bool (float, unsigned int, unsigned long long), libime::matchWordsOnTrie<libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const::{lambda(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, float)#2}>(libime::MatchedPinyinPath const&, libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const::{lambda(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, float)#2} const&)::{lambda(float, unsigned int, unsigned long long)#1}>::_M_invoke(std::_Any_data const&, float&&, unsigned int&&, unsigned long long&&) () from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#4  0xf7d41ec2 in std::function<bool (float, unsigned int, unsigned long long)>::operator()(float, unsigned int, unsigned long long) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#5  0xf7d3bac6 in libime::DATriePrivate<float, true, 1>::foreach(std::function<bool (float, unsigned int, unsigned long long)>, libime::DATriePrivate<float, true, 1>::npos_t) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#6  0xf7d376a1 in libime::DATrie<float>::foreach(std::function<bool (float, unsigned int, unsigned long long)>, unsigned long long) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#7  0xf7f247be in void libime::matchWordsOnTrie<libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const::{lambda(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, float)#2}>(libime::MatchedPinyinPath const&, libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const::{lambda(std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, float)#2} const&) () from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#8  0xf7f21bd8 in libime::PinyinDictionaryPrivate::matchWordsForOnePath(libime::PinyinMatchContext const&, libime::MatchedPinyinPath const&) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#9  0xf7f21cb2 in libime::PinyinDictionaryPrivate::matchWords(libime::PinyinMatchContext const&, std::vector<libime::MatchedPinyinPath, std::allocator<libime::MatchedPinyinPath> > const&) const () from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#10 0xf7f224a3 in libime::PinyinDictionaryPrivate::findMatchesBetween(libime::PinyinMatchContext const&, libime::SegmentGraphNode const&, libime::SegmentGraphNode const&, std::vector<libime::MatchedPinyinPath, std::allocator<libime::MatchedPinyinPath> >&) const () from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#11 0xf7f228d4 in libime::PinyinDictionaryPrivate::matchNode(libime::PinyinMatchContext const&, libime::SegmentGraphNode const&) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#12 0xf7f22b58 in libime::PinyinDictionary::matchPrefixImpl(libime::SegmentGraph const&, std::function<void (std::vector<libime::SegmentGraphNode const*, std::allocator<libime::SegmentGraphNode const*> > const&, libime::WordNode&, float, std::unique_ptr<libime::LatticeNodeData, std::default_delete<libime::LatticeNodeData> >)> const&, std::unordered_set<libime::SegmentGraphNode const*, std::hash<libime::SegmentGraphNode const*>, std::equal_to<libime::SegmentGraphNode const*>, std::allocator<libime::SegmentGraphNode const*> > const&, void*) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/pinyin/libIMEPinyin.so.0
#13 0xf7d59c3f in libime::Dictionary::matchPrefix(libime::SegmentGraph const&, std::function<void (std::vector<libime::SegmentGraphNode const*, std::allocator<libime::SegmentGraphNode const*> > const&, libime::WordNode&, float, std::unique_ptr<libime::LatticeNodeData, std::default_delete<libime::LatticeNodeData> >)> const&, std::unordered_set<libime::SegmentGraphNode const*, std::hash<libime::SegmentGraphNode const*>, std::equal_to<libime::SegmentGraphNode const*>, std::allocator<libime::SegmentGraphNode const*> > const&, void*) const ()
   from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#14 0xf7d55698 in libime::DecoderPrivate::buildLattice(libime::Decoder const*, libime::Lattice&, std::unordered_set<libime::SegmentGraphNode const*, std::hash<libime::SegmentGraphNode const*>, std::equal_to<libime::SegmentGraphNode const*>, std::allocator<libime::SegmentGraphNode const*> > const&, std::array<char, 24u> const&, libime::SegmentGraph const&, unsigned int, void*) const () from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#15 0xf7d56b73 in libime::Decoder::decode(libime::Lattice&, libime::SegmentGraph const&, unsigned int, std::array<char, 24u> const&, float, float, unsigned int, unsigned int, void*) const
    () from /build/libime-Mbrauo/libime/build/src/libime/core/libIMECore.so.0
#16 0x5655e6bd in testTime(libime::PinyinDictionary&, libime::Decoder&, char const*, fcitx::Flags<libime::PinyinFuzzyFlag>, int) ()
#17 0x5655ea2c in main ()
(gdb) 

@karuboniru
Copy link
Contributor

Same on Fedora 32 and rawhide, tested with/without LTO, the build log containing the error can be found here

  • libime commit: a108d15b06f0885f2fcc95d035614665392bc83b
  • kenlm commit: 96d303cfb1a0c21b8f060dbad640d7ab301c019a
  • gcc-c++ version: 10.2.1

@wengxt wengxt closed this as completed in dff3ea6 Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants