Boost C++ Libraries: Ticket #9407: Patch to suppress valgrind error notifications + more entropy on Win https://svn.boost.org/trac10/ticket/9407 <p> Valgrind reports "read of unitialized memory" while running the regression tests of uuid library: </p> <pre class="wiki">==11806== Conditional jump or move depends on uninitialised value(s) ==11806== at 0x407AF2: boost::random::mersenne_twister_engine&lt;unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u&gt;::normalize_state() (mersenne_twister.hpp:341) ==11806== by 0x40715E: void boost::random::mersenne_twister_engine&lt;unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u&gt;::seed&lt;boost::uuids::detail::generator_iterator&lt;boost::uuids::detail::seed_rng&gt; &gt;(boost::uuids::detail::generator_iterator&lt;boost::uuids::detail::seed_rng&gt;&amp;, boost::uuids::detail::generator_iterator&lt;boost::uuids::detail::seed_rng&gt;) (mersenne_twister.hpp:173) ==11806== by 0x40611E: void boost::uuids::detail::seed&lt;boost::random::mersenne_twister_engine&lt;unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u&gt; &gt;(boost::random::mersenne_twister_engine&lt;unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u&gt;&amp;) (seed_rng.hpp:249) ==11806== by 0x404FE8: boost::uuids::basic_random_generator&lt;boost::random::mersenne_twister_engine&lt;unsigned int, 32ul, 624ul, 397ul, 31ul, 2567483615u, 11ul, 4294967295u, 7ul, 2636928640u, 15ul, 4022730752u, 18ul, 1812433253u&gt; &gt;::basic_random_generator() (random_generator.hpp:50) ==11806== by 0x402B8A: main (test_random_generator.cpp:38) </pre><p> This is done intentionally, however it hardens debugging of code. Attached patch adds ability to gather entropy using <a class="missing wiki">CryptGenRandom</a> and replaces read of initialized memory with two other operations that gather entropy in more valgrind-friendly way. </p> <p> After applying that patch valgrind reports no errors: </p> <pre class="wiki">==13997== Command: ./test_random_generator ==13997== No errors detected. ==13997== </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9407 Trac 1.4.3 Antony Polukhin Tue, 19 Nov 2013 08:12:26 GMT attachment set https://svn.boost.org/trac10/ticket/9407 https://svn.boost.org/trac10/ticket/9407 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">uuid_valgrind.patch</span> </li> </ul> Ticket Antony Polukhin Tue, 19 Nov 2013 11:26:54 GMT type changed https://svn.boost.org/trac10/ticket/9407#comment:1 https://svn.boost.org/trac10/ticket/9407#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket Antony Polukhin Wed, 30 Jul 2014 14:43:17 GMT <link>https://svn.boost.org/trac10/ticket/9407#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9407#comment:2</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/uuid/pull/2"><span class="icon">​</span>Pull request</a> on github with fix for this issue. </p> </description> <category>Ticket</category> </item> <item> <author>nigel.stewart@…</author> <pubDate>Thu, 30 Oct 2014 23:19:30 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9407#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9407#comment:3</guid> <description> <p> +1 for this </p> <p> I needed to exclude boost uuid test coverage due to these UMRs. It undermines confidence in boost to be relying on that for entropy, IMHO. </p> </description> <category>Ticket</category> </item> <item> <author>xyzdragon@…</author> <pubDate>Tue, 19 Apr 2016 11:03:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9407#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9407#comment:4</guid> <description> <p> Hi, I also have this problem. Seeing that the last post was almost 2 years ago, is there still progress on this one? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Sun, 27 Aug 2017 18:19:41 GMT</pubDate> <title>status changed; resolution set; milestone deleted https://svn.boost.org/trac10/ticket/9407#comment:5 https://svn.boost.org/trac10/ticket/9407#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> <p> This patch was merged into boost-1.59, so I am marking this as resolved. I will have someone else fix the milestone. </p> Ticket Michael Caisse Sun, 27 Aug 2017 23:24:16 GMT milestone set https://svn.boost.org/trac10/ticket/9407#comment:6 https://svn.boost.org/trac10/ticket/9407#comment:6 <ul> <li><strong>milestone</strong> → <span class="trac-field-new">Boost 1.59.0</span> </li> </ul> Ticket