poco icon indicating copy to clipboard operation
poco copied to clipboard

ServerApplication use-of-uninitialized-value

Open TheAifam5 opened this issue 6 years ago • 3 comments

Version: 1.9.0 OS: ArchLinux x64 Package: https://www.archlinux.org/packages/community/x86_64/poco/

Empty application based on ServerApplication.

Log:

Uninitialized bytes in __interceptor_memcmp at offset 0 inside [0x702000000ae0, 16)
==16462==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7fc9578f1482 in Poco::Util::MapConfiguration::setRaw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/usr/lib/libPocoUtil.so.60+0x58482)
    #1 0x7fc9578ed923 in Poco::Util::LayeredConfiguration::setRaw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/usr/lib/libPocoUtil.so.60+0x54923)
    #2 0x7fc9578d0c95 in Poco::Util::AbstractConfiguration::setRawWithEvent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (/usr/lib/libPocoUtil.so.60+0x37c95)
    #3 0x7fc9578d162d in Poco::Util::AbstractConfiguration::setString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/usr/lib/libPocoUtil.so.60+0x3862d)
    #4 0x7fc9578d98cd in Poco::Util::Application::setArgs(int, char**) (/usr/lib/libPocoUtil.so.60+0x408cd)
    #5 0x7fc9578dae49 in Poco::Util::Application::init(int, char**) (/usr/lib/libPocoUtil.so.60+0x41e49)
    #6 0x7fc9578f709d in Poco::Util::ServerApplication::run(int, char**) (/usr/lib/libPocoUtil.so.60+0x5e09d)
    #7 0x55a8846ac4ed in main /home/theaifam5/Documents/Projects/TheAifam5/program/main.cpp:5:1
    #8 0x7fc956f05222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
    #9 0x55a884630a8d in _start (/home/theaifam5/Documents/Projects/TheAifam5/program/cmake-build-debug/program+0x25a8d)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/usr/lib/libPocoUtil.so.60+0x58482) in Poco::Util::MapConfiguration::setRaw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
Exiting

TheAifam5 avatar Jan 25 '19 23:01 TheAifam5

Either a false positive or something wrong with your usage of Poco::Util::Application.

obiltschnig avatar Jan 26 '19 08:01 obiltschnig

That happens direct on the start, before the main function in ServerApp gets executed.

My implementation calls overrides some functions (found in docu which I should), they calling directly base class.

I will check that shortly

TheAifam5 avatar Jan 26 '19 11:01 TheAifam5

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Jun 22 '22 03:06 github-actions[bot]

This issue was closed because it has been inactive for 60 days since being marked as stale.

github-actions[bot] avatar Aug 21 '22 03:08 github-actions[bot]