How to troubleshoot a crash under Cygwin at -O3?

Jeffrey Walton noloader@gmail.com
Wed Aug 12 17:05:00 GMT 2015


> I think you might be right here. I think I was working it with as
> order-of-initialization problem, and I did add init_priority to try
> and tame the issue.
>

Valgrind is complaining about 6 or so unitialized jumps. I'll need to
investigate them further.

One that caught my eye is the one below. I believe the uninitialized
data is the empty string. It only shows up when __memcmp_sse4 is used.

We actually create an empty string early and force its initialization
with an init_priority because it was one of those problem ITU areas.
if the optimizer is folding strings, then would that preclude problems
with the empty string?

Jeff

Testing SymmetricCipher algorithm Salsa20.
......==11319== Conditional jump or move depends on uninitialised value(s)
==11319==    at 0x4C2E8C2: __memcmp_sse4_1 (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==11319==    by 0x49A070: compare (char_traits.h:259)
==11319==    by 0x49A070:
__gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type
std::operator==<char>(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
(basic_string.h:4912)
==11319==    by 0x493EFF: operator!=<char, std::char_traits<char>,
std::allocator<char> > (basic_string.h:4950)
==11319==    by 0x493EFF: TestSymmetricCipher(std::map<std::string,
std::string, std::less<std::string>,
std::allocator<std::pair<std::string const, std::string> > >&,
CryptoPP::NameValuePairs const&) (datatest.cpp:430)
==11319==    by 0x4987C8: TestDataFile(std::string const&,
CryptoPP::NameValuePairs const&, unsigned int&, unsigned int&)
(datatest.cpp:713)
==11319==    by 0x498DA7: RunTestDataFile(char const*,
CryptoPP::NameValuePairs const&, bool) (datatest.cpp:758)
==11319==    by 0x4620E8: ValidateSalsa (validat1.cpp:1377)
==11319==    by 0x4620E8: ValidateAll(bool) (validat1.cpp:92)
==11319==    by 0x447AC8: Validate(int, bool, char const*) (test.cpp:797)
==11319==    by 0x4058D3: main (test.cpp:316)
==11319==
==11319== Conditional jump or move depends on uninitialised value(s)
==11319==    at 0x4C2E8C2: __memcmp_sse4_1 (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==11319==    by 0x49A070: compare (char_traits.h:259)
==11319==    by 0x49A070:
__gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type
std::operator==<char>(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
(basic_string.h:4912)
==11319==    by 0x493BFE: operator!=<char, std::char_traits<char>,
std::allocator<char> > (basic_string.h:4950)
==11319==    by 0x493BFE: TestSymmetricCipher(std::map<std::string,
std::string, std::less<std::string>,
std::allocator<std::pair<std::string const, std::string> > >&,
CryptoPP::NameValuePairs const&) (datatest.cpp:442)
==11319==    by 0x4987C8: TestDataFile(std::string const&,
CryptoPP::NameValuePairs const&, unsigned int&, unsigned int&)
(datatest.cpp:713)
==11319==    by 0x498DA7: RunTestDataFile(char const*,
CryptoPP::NameValuePairs const&, bool) (datatest.cpp:758)
==11319==    by 0x4620E8: ValidateSalsa (validat1.cpp:1377)
==11319==    by 0x4620E8: ValidateAll(bool) (validat1.cpp:92)
==11319==    by 0x447AC8: Validate(int, bool, char const*) (test.cpp:797)
==11319==    by 0x4058D3: main (test.cpp:316)
==11319==



More information about the Gcc-help mailing list