id summary reporter owner description type status milestone component version severity resolution keywords cc 7248 UUID Conditional jump or move depends on uninitialised value(s) df@… Andy Tompkins "The following code produces Valgrind warnings: Code: {{{ boost::uuids::uuid uuid = boost::uuids::random_generator()(); }}} Valgrind: {{{ ==5381== Memcheck, a memory error detector ==5381== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==5381== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==5381== Command: ../../bin/test/test_r14p ==5381== ==5381== Conditional jump or move depends on uninitialised value(s) ==5381== at 0x40296B: main (mersenne_twister.hpp:177) ==5381== Uninitialised value was created by a heap allocation ==5381== at 0x4C2747E: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5381== by 0x4041AD: boost::uuids::detail::seed_rng::sha1_random_digest_() (seed_rng.hpp:162) ==5381== by 0x402910: main (seed_rng.hpp:103) ==5381== ==5381== Conditional jump or move depends on uninitialised value(s) ==5381== at 0x40298D: main (mersenne_twister.hpp:179) ==5381== Uninitialised value was created by a heap allocation ==5381== at 0x4C2747E: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5381== by 0x4041AD: boost::uuids::detail::seed_rng::sha1_random_digest_() (seed_rng.hpp:162) ==5381== by 0x402910: main (seed_rng.hpp:103) ==5381== ==5381== Use of uninitialised value of size 8 ==5381== at 0x54DD208: ??? (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x54E25AA: std::ostreambuf_iterator > std::num_put > >::_M_insert_int(std::ostreambuf_iterator >, std::ios_base&, char, unsigned long) const (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x54E27A5: std::num_put > >::do_put(std::ostreambuf_iterator >, std::ios_base&, char, unsigned long) const (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x54F4FCD: std::ostream& std::ostream::_M_insert(unsigned long) (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x402CCD: main (ostream:195) ==5381== Uninitialised value was created by a heap allocation ==5381== at 0x4C2747E: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5381== by 0x4041AD: boost::uuids::detail::seed_rng::sha1_random_digest_() (seed_rng.hpp:162) ==5381== by 0x404BBE: void boost::random::detail::fill_array_int_impl<32, 624ul, boost::uuids::detail::generator_iterator, unsigned int>(boost::uuids::detail::generator_iterator&, boost::uuids::detail::generator_iterator, unsigned int (&) [624ul]) (seed_rng.hpp:103) ==5381== by 0x40295B: main (seed_impl.hpp:324) ==5381== ==5381== Conditional jump or move depends on uninitialised value(s) ==5381== at 0x54DD20E: ??? (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x54E25AA: std::ostreambuf_iterator > std::num_put > >::_M_insert_int(std::ostreambuf_iterator >, std::ios_base&, char, unsigned long) const (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x54E27A5: std::num_put > >::do_put(std::ostreambuf_iterator >, std::ios_base&, char, unsigned long) const (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x54F4FCD: std::ostream& std::ostream::_M_insert(unsigned long) (in /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6.0.13) ==5381== by 0x402CCD: main (ostream:195) ==5381== Uninitialised value was created by a heap allocation ==5381== at 0x4C2747E: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==5381== by 0x4041AD: boost::uuids::detail::seed_rng::sha1_random_digest_() (seed_rng.hpp:162) ==5381== by 0x404BBE: void boost::random::detail::fill_array_int_impl<32, 624ul, boost::uuids::detail::generator_iterator, unsigned int>(boost::uuids::detail::generator_iterator&, boost::uuids::detail::generator_iterator, unsigned int (&) [624ul]) (seed_rng.hpp:103) ==5381== by 0x40295B: main (seed_impl.hpp:324) ==5381== c0dbd170-11c6-4877-9180-d26753748484 ==5381== ==5381== HEAP SUMMARY: ==5381== in use at exit: 0 bytes in 0 blocks ==5381== total heap usage: 128 allocs, 128 frees, 3,596 bytes allocated ==5381== ==5381== All heap blocks were freed -- no leaks are possible ==5381== ==5381== For counts of detected and suppressed errors, rerun with: -v ==5381== ERROR SUMMARY: 48 errors from 4 contexts (suppressed: 6 from 6) }}} The following works without any warnings: {{{ boost::mt19937 ran; boost::uuids::uuid uuid = boost::uuids::random_generator(ran)(); }}}" Bugs closed Boost 1.66.0 uuid Boost 1.55.0 Problem worksforme uuid, valgrind