Boost C++ Libraries: Ticket #7499: call_once doesn't call even once https://svn.boost.org/trac10/ticket/7499 <p> In boost 1.52.0 beta1 </p> <p> In boost/thread/pthread/once.hpp, near the head of the file, is the following conditional snippet: </p> <p> #ifdef SIG_ATOMIC_MAX </p> <blockquote> <p> typedef sig_atomic_t uintmax_atomic_t; ... </p> </blockquote> <p> #else </p> <blockquote> <p> ... </p> </blockquote> <p> #endif </p> <p> Well, sig_atomic_t may be a signed type, and in fact on the Linux system I'm testing on it is a typedef for int [suse12.1, but I suspect it doesn't really matter.] POSIX says "Possibly volatile-qualified integer type ...". </p> <p> This led to boost::call_once never calling the function, because there is a comparison in call_once </p> <blockquote> <p> (epoch&lt;this_thread_epoch) </p> </blockquote> <p> where I'm seeing values of 0 and -2 respectively for those variables, that doesn't go in the expected direction when uintmax_atomic_t is a signed type rather than the expected unsigned type. I bet there are other places that get confused by this being an unexpectedly signed type. </p> <p> I'm working around this to continue my testing of 1.52beta1 by commenting out the offending conditional code and just using the code in the #else clause. </p> <p> The relevant code is new code, introduced since boost 1.51. This is a serious regression that should be a blocker for the 1.52 release. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7499 Trac 1.4.3 viboes Thu, 11 Oct 2012 23:59:44 GMT owner, status, version changed https://svn.boost.org/trac10/ticket/7499#comment:1 https://svn.boost.org/trac10/ticket/7499#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.52.0</span> → <span class="trac-field-new">Boost 1.51.0</span> </li> </ul> Ticket viboes Fri, 12 Oct 2012 00:02:08 GMT <link>https://svn.boost.org/trac10/ticket/7499#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7499#comment:2</guid> <description> <p> Committed in trunk revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80966" title="Thread: Rollback SIG_ATOMIC_MAX change for once.hpp. ref #7499">[80966]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 14 Oct 2012 15:27:07 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/7499#comment:3 https://svn.boost.org/trac10/ticket/7499#comment:3 <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> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.52.0</span> </li> </ul> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/80985" title="Thread: merged 80966">[80985]</a>. </p> Ticket