Boost C++ Libraries: Ticket #2325: Use of tmpnam may produce spurious test results https://svn.boost.org/trac10/ticket/2325 <p> As described in <a class="ext-link" href="http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html"><span class="icon">​</span>http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/avoid-race.html</a>, tmpnam is subject to race conditions, which makes it especially bad for use in testing when testers are exploiting parallelism via threads or processes. Several files in the library are using tmpnam when they should use mkstemp. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2325 Trac 1.4.3 Jonathan Turkanis Sun, 14 Sep 2008 19:00:20 GMT status changed https://svn.boost.org/trac10/ticket/2325#comment:1 https://svn.boost.org/trac10/ticket/2325#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Douglas Gregor Tue, 23 Sep 2008 00:26:22 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2325#comment:2 https://svn.boost.org/trac10/ticket/2325#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/48922" title="CodeGear C++ fix, from Nicola Musatti. Fixes #2325">[48922]</a>) <a class="missing wiki">CodeGear</a> C++ fix, from Nicola Musatti. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2325" title="#2325: Bugs: Use of tmpnam may produce spurious test results (closed: fixed)">#2325</a> </p> Ticket Douglas Gregor Tue, 23 Sep 2008 04:51:02 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/2325#comment:3 https://svn.boost.org/trac10/ticket/2325#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Oops! Typo in my commit message accidentally closed this bug. Re-opening. </p> Ticket Daniel James Fri, 12 Mar 2010 19:53:37 GMT owner, status, milestone changed https://svn.boost.org/trac10/ticket/2325#comment:4 https://svn.boost.org/trac10/ticket/2325#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Jonathan Turkanis</span> to <span class="trac-author">Daniel James</span> </li> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">new</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">To Be Determined</span> </li> </ul> Ticket Steven Watanabe Mon, 14 Jun 2010 17:53:54 GMT <link>https://svn.boost.org/trac10/ticket/2325#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2325#comment:5</guid> <description> <p> Boost.Filesystem v3 has a unique_path function that should work better, as it uses <a class="missing wiki">CryptGenRandom</a> to create the file name. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Tue, 29 Jun 2010 14:13:55 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2325#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2325#comment:6</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/63429" title="Use `unique_path` instead of tmpnam. Refs #2325.">[63429]</a>) Use <code>unique_path</code> instead of tmpnam. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2325" title="#2325: Bugs: Use of tmpnam may produce spurious test results (closed: fixed)">#2325</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Tue, 29 Jun 2010 14:30:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2325#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2325#comment:7</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/63433" title="Fix call to `unique_path` on windows. Refs #2325.">[63433]</a>) Fix call to <code>unique_path</code> on windows. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2325" title="#2325: Bugs: Use of tmpnam may produce spurious test results (closed: fixed)">#2325</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Thu, 01 Jul 2010 21:32:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2325#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2325#comment:8</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/63502" title="Merge iostreams. * New constructors/`open` for file descriptors. ...">[63502]</a>) Merge iostreams. </p> <ul><li>New constructors/<code>open</code> for file descriptors. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3517" title="#3517: Bugs: [iostreams] stream&lt;file_descriptor_source&gt; closes supplied descriptor (closed: fixed)">#3517</a>. </li><li>Use <code>unique_path</code> instead of tmpnam. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2325" title="#2325: Bugs: Use of tmpnam may produce spurious test results (closed: fixed)">#2325</a>. </li></ul> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Tue, 06 Jul 2010 23:07:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2325#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2325#comment:9</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/63711" title="Use unique_path instead of tmpnam. Refs #2325. ">[63711]</a>) Use unique_path instead of tmpnam. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2325" title="#2325: Bugs: Use of tmpnam may produce spurious test results (closed: fixed)">#2325</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Dean Michael Berris</dc:creator> <pubDate>Mon, 29 Nov 2010 00:36:00 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2325#comment:10 https://svn.boost.org/trac10/ticket/2325#comment:10 <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> </ul> <p> It looks like this already in trunk. Marking as fixed. </p> Ticket