nixcloud / ip2unix

Turn IP sockets into Unix domain sockets
GNU Lesser General Public License v3.0
361 stars 10 forks source link

random SIGSEGV in test_globpath #15

Closed etam closed 4 years ago

etam commented 4 years ago

Happened once. Possible cause:

$ valgrind ./test_globpath
==12750== Memcheck, a memory error detector
==12750== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12750== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==12750== Command: ./test_globpath
==12750==
==12750== Conditional jump or move depends on uninitialised value(s)
==12750==    at 0x410F8D: GlobPath::match_cclass(unsigned long*, char const&) (globpath.cc:77)
==12750==    by 0x411612: GlobPath::match() (globpath.cc:237)
==12750==    by 0x411788: globpath(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&) (globpath.cc:298)
==12750==    by 0x402870: main (globpath.cc:24)
==12750==
==12750== Conditional jump or move depends on uninitialised value(s)
==12750==    at 0x410E32: GlobPath::match_cclass(unsigned long*, char const&) (globpath.cc:58)
==12750==    by 0x411612: GlobPath::match() (globpath.cc:237)
==12750==    by 0x411788: globpath(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&) (globpath.cc:298)
==12750==    by 0x402870: main (globpath.cc:24)
==12750==
==12750== Conditional jump or move depends on uninitialised value(s)
==12750==    at 0x410F65: GlobPath::match_cclass(unsigned long*, char const&) (globpath.cc:73)
==12750==    by 0x411612: GlobPath::match() (globpath.cc:237)
==12750==    by 0x411788: globpath(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&) (globpath.cc:298)
==12750==    by 0x402870: main (globpath.cc:24)
==12750==
==12750==
==12750== HEAP SUMMARY:
==12750==     in use at exit: 0 bytes in 0 blocks
==12750==   total heap usage: 15 allocs, 15 frees, 72,984 bytes allocated
==12750==
==12750== All heap blocks were freed -- no leaks are possible
==12750==
==12750== Use --track-origins=yes to see where uninitialised values come from
==12750== For lists of detected and suppressed errors, rerun with: -s
==12750== ERROR SUMMARY: 50313 errors from 3 contexts (suppressed: 0 from 0)

You might also get better info from a sanitizer.