Boost C++ Libraries: Ticket #8243: strerror is not thread-safe on all platforms https://svn.boost.org/trac10/ticket/8243 <p> boost/exception/errinfo_errno.hpp uses strerror function which is not thread-safe on many platforms (e.g. Linux). Its use should be replaced with strerror_r, when possible. </p> <p> As a hint for implementation see libs/system/src/error_code.cpp. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8243 Trac 1.4.3 Emil Dotchevski Fri, 08 Mar 2013 02:02:59 GMT <link>https://svn.boost.org/trac10/ticket/8243#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8243#comment:1</guid> <description> <p> Perhaps this should be implemented as a module that can be called from errinfo_errno.hpp? Note however that in this case it has to be header-only module because Boost Exception can't require separate build. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Fri, 08 Mar 2013 07:15:46 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8243#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8243#comment:2</guid> <description> <p> Yes, that's probably a good idea (I created several tickets like this one for different libraries). However, it's not clear which library should host this tool. </p> <p> I had the idea of creating a BOOST_HAS_STRERROR_R macro in Boost.Config, which would simplify the detection of strerror_r. The strerror_r use is rather simple and I'm not sure there's need to extract the call itself. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Emil Dotchevski</dc:creator> <pubDate>Fri, 08 Mar 2013 08:03:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8243#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8243#comment:3</guid> <description> <p> Can't we have boost/strerror.hpp that defines boost::strerror() which either uses strerror_r or falls back to whatever other behavior makes sense? I don't think it's worth involving Boost.Config or any other library in this. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Fri, 08 Mar 2013 08:30:36 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8243#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8243#comment:4</guid> <description> <p> With the upcoming move to modularized Boost, I don't think that top level headers will be welcome. Maybe boost/utility/strerror.hpp or boost/system/strerror.hpp? Maybe we should bring this up on the ML? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Emil Dotchevski</dc:creator> <pubDate>Sat, 09 Mar 2013 00:13:31 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/8243#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8243#comment:5</guid> <description> <p> Where strerror.hpp is doesn't make it less or more modular, assuming it does not depend on other Boost headers, which it shouldn't. If it is put in "utility" someone might reasonably think that it's part of the entire "utility" lib, which would be the opposite of modular design. My 2c anyway. </p> </description> <category>Ticket</category> </item> </channel> </rss>