Actions
Bug #6869
closedPossible unitialised value
Start date:
01/21/2019
Due date:
% Done:
0%
Estimated time:
Description
hi, with Valgrind I found that adding an item to a popupmenu (which is added with setMenu() to a button) will cause a "Conditional jump or move depends on uninitialised value(s)" warning.
However, I'm not familiar with the Wt code, so I can't propose a fix. I hope the valgrind output helps you guys.
==15357== Conditional jump or move depends on uninitialised value(s)
==15357== at 0x652CE97: __wcsnlen_avx2 (strlen-avx2.S:275)
==15357== by 0x645B458: wcsnrtombs (wcsnrtombs.c:58)
==15357== by 0x5EABD9D: std::codecvt<wchar_t, char, __mbstate_t>::do_out(__mbstate_t&, wchar_t const*, wchar_t const*, wchar_t const*&, char*, char*, char*&) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==15357== by 0x550B25D: out (codecvt.h:122)
==15357== by 0x550B25D: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > Wt::(anonymous namespace)::do_narrow<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::locale const&) (WStringUtil.C:91)
==15357== by 0x550BCDC: Wt::narrow(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, std::locale const&) (WStringUtil.C:327)
==15357== by 0x550C316: Wt::fromUTF8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::locale const&) (WStringUtil.C:388)
==15357== by 0x55019B6: Wt::WString::narrow[abi:cxx11](std::locale const&) const (WString.C:427)
==15357== by 0x547B7A7: Wt::WMenuItem::setText(Wt::WString const&) (WMenuItem.C:187)
==15357== by 0x547DA9F: Wt::WMenuItem::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Wt::WString const&, std::unique_ptr<Wt::WWidget, std::default_delete<Wt::WWidget> >, Wt::ContentLoading) (WMenuItem.C:89)
==15357== by 0x547DE6D: Wt::WMenuItem::WMenuItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Wt::WString const&, std::unique_ptr<Wt::WWidget, std::default_delete<Wt::WWidget> >, Wt::ContentLoading) (WMenuItem.C:40)
==15357== by 0x5476C15: Wt::WMenu::addItem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Wt::WString const&, std::unique_ptr<Wt::WWidget, std::default_delete<Wt::WWidget> >, Wt::ContentLoading) (WMenu.C:154)
==15357== by 0x5476D03: Wt::WMenu::addItem(Wt::WString const&, std::unique_ptr<Wt::WWidget, std::default_delete<Wt::WWidget> >, Wt::ContentLoading) (WMenu.C:146)
Updated by Roel Standaert almost 6 years ago
- Status changed from New to Closed
I've checked and we're passing valid input into that function. I think this is a false positive in Valgrind. The version of Valgrind that comes with my distro (Ubuntu 18.04) reports this too, but a newer version I compiled from source doesn't.
Actions