@adelrune wrote:
I recently compiled and installed of on mint 18.3 (based on ubuntu 16.04). I can successfully run the examples included with of but the project generator segfault when I try to create a project with it. The projectGenerator command works when no arguments are passed to it and it correctly displays the documentation but anytime I try to give it a path it segfaults without any other input.
Here is the output when I ran the command through valgrind :
==13086== Memcheck, a memory error detector ==13086== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==13086== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==13086== Command: projectGenerator test ==13086== ==13086== Conditional jump or move depends on uninitialised value(s) ==13086== at 0x96B212A: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==13086== by 0x6A566C: Poco::Path::clear() (in /usr/local/bin/projectGenerator) ==13086== by 0x516DE50: Poco::Path::parseUnix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E108: Poco::Path::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E195: Poco::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x46E214: main (in /usr/local/bin/projectGenerator) ==13086== ==13086== Conditional jump or move depends on uninitialised value(s) ==13086== at 0x96B21F3: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==13086== by 0x6A566C: Poco::Path::clear() (in /usr/local/bin/projectGenerator) ==13086== by 0x516DE50: Poco::Path::parseUnix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E108: Poco::Path::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E195: Poco::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x46E214: main (in /usr/local/bin/projectGenerator) ==13086== ==13086== Use of uninitialised value of size 8 ==13086== at 0x96B21E9: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21) ==13086== by 0x6A566C: Poco::Path::clear() (in /usr/local/bin/projectGenerator) ==13086== by 0x516DE50: Poco::Path::parseUnix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E108: Poco::Path::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E195: Poco::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x46E214: main (in /usr/local/bin/projectGenerator) ==13086== ==13086== Invalid read of size 8 ==13086== at 0x6A5679: Poco::Path::clear() (in /usr/local/bin/projectGenerator) ==13086== by 0x516DE50: Poco::Path::parseUnix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E108: Poco::Path::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E195: Poco::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x46E214: main (in /usr/local/bin/projectGenerator) ==13086== Address 0xffffffffffffffe8 is not stack'd, malloc'd or (recently) free'd ==13086== ==13086== ==13086== Process terminating with default action of signal 11 (SIGSEGV) ==13086== Access not within mapped region at address 0xFFFFFFFFFFFFFFE8 ==13086== at 0x6A5679: Poco::Path::clear() (in /usr/local/bin/projectGenerator) ==13086== by 0x516DE50: Poco::Path::parseUnix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E108: Poco::Path::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x516E195: Poco::Path::Path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /usr/lib/libPocoFoundation.so.9) ==13086== by 0x46E214: main (in /usr/local/bin/projectGenerator) ==13086== If you believe this happened as a result of a stack ==13086== overflow in your program's main thread (unlikely but ==13086== possible), you can try to increase the size of the ==13086== main thread stack using the --main-stacksize= flag. ==13086== The main thread stack size used in this run was 8388608. ==13086== ==13086== HEAP SUMMARY: ==13086== in use at exit: 329,868 bytes in 2,629 blocks ==13086== total heap usage: 3,343 allocs, 714 frees, 404,616 bytes allocated ==13086== ==13086== LEAK SUMMARY: ==13086== definitely lost: 0 bytes in 0 blocks ==13086== indirectly lost: 0 bytes in 0 blocks ==13086== possibly lost: 1,352 bytes in 18 blocks ==13086== still reachable: 328,516 bytes in 2,611 blocks ==13086== of which reachable via heuristic: ==13086== stdstring : 3,884 bytes in 80 blocks ==13086== newarray : 1,536 bytes in 16 blocks ==13086== suppressed: 0 bytes in 0 blocks ==13086== Rerun with --leak-check=full to see details of leaked memory ==13086== ==13086== For counts of detected and suppressed errors, rerun with: -v ==13086== Use --track-origins=yes to see where uninitialised values come from ==13086== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) Segmentation fault (core dumped)```
Posts: 2
Participants: 2