Boost C++ Libraries: Ticket #7901: jam's hash.c misaligns hashed entries https://svn.boost.org/trac10/ticket/7901 <p> On platforms where a void* is smaller (e.g. 32bit) than a time_t (e.g. 64bit) and where the cpu requires strict alignment, jam bus errors already during bootstrap. NetBSD/sparc is an example for such a platform. </p> <p> This is because the hash_item_data macro () casts to char* and adds sizeof a struct only containing a pointer, while later filesys code stores file_info_t structures in a hash (which include time_t members and need greater alignment). </p> <p> Since this is all needed very early, the easiest and most portable solution is to force sizeof(ITEM) to be great enough for the required alignment by making it a union including a dummy time_t member. This has the benefit of beeing a no-op for non affected architectures. </p> <p> I have a patch tested against the 1.52 release, but the idea should be obvious and applying it to the (a bit different) trunk code should be straighforward. Please let me know if you need a real patch against trunk. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7901 Trac 1.4.3 martin@… Thu, 17 Jan 2013 16:06:53 GMT attachment set https://svn.boost.org/trac10/ticket/7901 https://svn.boost.org/trac10/ticket/7901 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patch</span> </li> </ul> <p> working patch against 1.52 </p> Ticket Kohei Takahashi <flast@…> Thu, 09 Oct 2014 05:59:52 GMT component changed; owner set https://svn.boost.org/trac10/ticket/7901#comment:1 https://svn.boost.org/trac10/ticket/7901#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Vladimir Prus</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">build</span> </li> </ul> Ticket