Hallo, für mich liest sich das so als stecke in der libc++ undefined Behaviour.
Wie man am Valgrind output sieht tritt das Problem in einem istream auf. Wenn ich in meinem Programm eine Exception schmeiße gibt es sogar ein Memory-Leak. Für mich liest sich das als wäre da ein Fehler in der libc++.
Könnte das eine Ursache in meinem Code haben?
Wie man am Valgrind output sieht tritt das Problem in einem istream auf. Wenn ich in meinem Programm eine Exception schmeiße gibt es sogar ein Memory-Leak. Für mich liest sich das als wäre da ein Fehler in der libc++.
Könnte das eine Ursache in meinem Code haben?
Code:
==7103== Conditional jump or move depends on uninitialised value(s)
==7103== at 0x4C23853: free (in /usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==7103== by 0x50C975E: std::__1::ios_base::~ios_base() (in /usr/lib/libc++.so.1)
==7103== by 0x407403: std::__1::basic_ifstream<char, std::__1::char_traits<char> >::~basic_ifstream() (iosfwd:131)
==7103== by 0x407428: std::__1::basic_ifstream<char, std::__1::char_traits<char> >::~basic_ifstream() (iosfwd:131)
==7103== by 0x405F75: operator() (memory:2431)
==7103== by 0x405F75: reset (memory:2630)
==7103== by 0x405F75: ~unique_ptr (memory:2598)
==7103== by 0x405F75: main (main.cpp:116)
==7103==
==7103== Conditional jump or move depends on uninitialised value(s)
==7103== at 0x4C23853: free (in /usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==7103== by 0x50C9770: std::__1::ios_base::~ios_base() (in /usr/lib/libc++.so.1)
==7103== by 0x407403: std::__1::basic_ifstream<char, std::__1::char_traits<char> >::~basic_ifstream() (iosfwd:131)
==7103== by 0x407428: std::__1::basic_ifstream<char, std::__1::char_traits<char> >::~basic_ifstream() (iosfwd:131)
==7103== by 0x405F75: operator() (memory:2431)
==7103== by 0x405F75: reset (memory:2630)
==7103== by 0x405F75: ~unique_ptr (memory:2598)
==7103== by 0x405F75: main (main.cpp:116)
==7103==
==7103==
==7103== HEAP SUMMARY:
==7103== in use at exit: 5,328 bytes in 6 blocks
==7103== total heap usage: 1,408,546 allocs, 1,408,540 frees, 13,482,532,159 bytes allocated
==7103==
==7103== LEAK SUMMARY:
==7103== definitely lost: 0 bytes in 0 blocks
==7103== indirectly lost: 0 bytes in 0 blocks
==7103== possibly lost: 0 bytes in 0 blocks
==7103== still reachable: 5,328 bytes in 6 blocks
==7103== suppressed: 0 bytes in 0 blocks
==7103== Rerun with --leak-check=full to see details of leaked memory
==7103==
==7103== For counts of detected and suppressed errors, rerun with: -v
==7103== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)