OK, so here's the output I got when running it from valgrind (I even removed my list.cc modifications for unparse_value):
$ valgrind ./moo
==72497== Memcheck, a memory error detector
==72497== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==72497== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==72497== Command: ./moo
==72497==
==72497==
==72497== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==72497== Bad permissions for mapped region at address 0x6538D08
==72497== at 0x6538D08: ??? (in /lib/libcxxrt.so.1)
==72497== by 0x5561E68: __dynamic_cast (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72497== by 0x55E620F: bool std::has_facet<std::ctype<char> >(std::locale const&) (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72497== by 0x55D9AD3: std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72497== by 0x55D9C4F: std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72497== by 0x55762A0: std::ios_base::Init::Init() (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72497== by 0x42D79D: __static_initialization_and_destruction_0 (iostream:74)
==72497== by 0x42D79D: _GLOBAL__sub_I__Z21dbpriv_set_dbio_inputP7(short, (intXX_t)) (db_io.cc:500)
==72497== by 0x4005619: ??? (in /libexec/ld-elf.so.1)
==72497== by 0x40049DA: ??? (in /libexec/ld-elf.so.1)
==72497== by 0x4002668: ??? (in /libexec/ld-elf.so.1)
==72497==
==72497== HEAP SUMMARY:
==72497== in use at exit: 75,704 bytes in 7 blocks
==72497== total heap usage: 7 allocs, 0 frees, 75,704 bytes allocated
==72497==
==72497== LEAK SUMMARY:
==72497== definitely lost: 0 bytes in 0 blocks
==72497== indirectly lost: 0 bytes in 0 blocks
==72497== possibly lost: 0 bytes in 0 blocks
==72497== still reachable: 75,704 bytes in 7 blocks
==72497== suppressed: 0 bytes in 0 blocks
==72497== Rerun with --leak-check=full to see details of leaked memory
==72497==
==72497== For counts of detected and suppressed errors, rerun with: -v
==72497== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault
When I run:
$ valgrind --log-file=moocore.log --read-var-info=yes --leak-check=full ./moo
I get (in the log file):
==72542== Memcheck, a memory error detector
==72542== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==72542== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==72542== Command: ./moo
==72542== Parent PID: 63391
==72542==
parse DIE(readdwarf3.c:3607): confused by:
<2><1ee>: Abbrev Number: 13 (DW_TAG_subrange_type)
DW_AT_type : <20b>
DW_AT_count : 0
parse_type_DIE:
--72542-- WARNING: Serious error when reading debug info
--72542-- When reading debug info from /usr/local/lib/valgrind/memcheck-amd64-freebsd:
--72542-- confused by the above DIE
parse DIE(readdwarf3.c:3607): confused by:
<2><46a>: Abbrev Number: 24 (DW_TAG_subrange_type)
DW_AT_type : <476>
DW_AT_count : 6
parse_type_DIE:
--72542-- WARNING: Serious error when reading debug info
--72542-- When reading debug info from /usr/local/lib/valgrind/vgpreload_memcheck-amd64-freebsd.so:
--72542-- confused by the above DIE
==72542==
==72542== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==72542== Bad permissions for mapped region at address 0x6538D08
==72542== at 0x6538D08: ??? (in /lib/libcxxrt.so.1)
==72542== by 0x5561E68: __dynamic_cast (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72542== by 0x55E620F: bool std::has_facet<std::ctype<char> >(std::locale const&) (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72542== by 0x55D9AD3: std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72542== by 0x55D9C4F: std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72542== by 0x55762A0: std::ios_base::Init::Init() (in /usr/local/lib/gcc6/libstdc++.so.6.0.22)
==72542== by 0x42D79D: __static_initialization_and_destruction_0 (iostream:74)
==72542== by 0x42D79D: _GLOBAL__sub_I__Z21dbpriv_set_dbio_inputP7(short, (intXX_t)) (db_io.cc:500)
==72542== by 0x4005619: ??? (in /libexec/ld-elf.so.1)
==72542== by 0x40049DA: ??? (in /libexec/ld-elf.so.1)
==72542== by 0x4002668: ??? (in /libexec/ld-elf.so.1)
==72542==
==72542== HEAP SUMMARY:
==72542== in use at exit: 75,704 bytes in 7 blocks
==72542== total heap usage: 7 allocs, 0 frees, 75,704 bytes allocated
==72542==
==72542== LEAK SUMMARY:
==72542== definitely lost: 0 bytes in 0 blocks
==72542== indirectly lost: 0 bytes in 0 blocks
==72542== possibly lost: 0 bytes in 0 blocks
==72542== still reachable: 75,704 bytes in 7 blocks
==72542== suppressed: 0 bytes in 0 blocks
==72542== Reachable blocks (those to which a pointer was found) are not shown.
==72542== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==72542==
==72542== For counts of detected and suppressed errors, rerun with: -v
==72542== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
So now, I'm honestly confused. I have no idea what I did wrong and where -- nothings exactly being helpful. Since you'll probably need to look throug it, the source code for my heavily modified copy of stunt is available at
https://www.dropbox.com/s/pmfl4g5xpavq77x/stunt.tar.gz?dl=1. It contains all my checksum functions, my RNG modification, as well as the mods I've made for my datatype for infinite precision integers.