Boost C++ Libraries: Ticket #977: bjam crashes when compiled with gcc 4.2 https://svn.boost.org/trac10/ticket/977 <p> This is reported a year ago to Debian bugtracker it seems <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a>. Bjam crashes when compiled with gcc 4.2.0 : </p> <p> southpark boost_1_34_0 # ./tools/jam/src/bin.linuxx86/bjam zsh: segmentation fault ./tools/jam/src/bin.linuxx86/bjam </p> <p> Debian bug report has a nice backtrace too. </p> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> <a class="ext-link" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367825"><span class="icon">​</span>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=367825</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/977 Trac 1.4.3 René Rivera Wed, 23 May 2007 14:59:27 GMT status, component changed; owner, version set https://svn.boost.org/trac10/ticket/977#comment:1 https://svn.boost.org/trac10/ticket/977#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">René Rivera</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-new">Boost.Jam 3.1.14</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">bjam</span> </li> </ul> Ticket ismail@… Wed, 30 May 2007 23:17:30 GMT <link>https://svn.boost.org/trac10/ticket/977#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:2</guid> <description> <p> Any news on this one? </p> </description> <category>Ticket</category> </item> <item> <author>barner@…</author> <pubDate>Sat, 07 Jul 2007 21:53:54 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:3</guid> <description> <p> Building bjam with -fno-strict-aliasing fixes this problem for me (on FreeBSD 7/amd64, gcc 4.2.0). </p> <p> I will attach a patch that is based on <a class="ext-link" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=22;filename=boost.diff;att=1;bug=367825"><span class="icon">​</span>http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=22;filename=boost.diff;att=1;bug=367825</a> </p> </description> <category>Ticket</category> </item> <item> <author>barner@…</author> <pubDate>Sat, 07 Jul 2007 21:55:44 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/977 https://svn.boost.org/trac10/ticket/977 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">patch-tools_jam_src_build.jam</span> </li> </ul> <p> Build bjam with -fno-strict-aliasing (fixes build with gcc 4.2.0) </p> Ticket ismail@… Sat, 07 Jul 2007 22:43:46 GMT <link>https://svn.boost.org/trac10/ticket/977#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:4</guid> <description> <p> Thats just a workaround, not a real fix, recently David Turner fixed ftjam for this bug. His changes could be backported. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Sat, 07 Jul 2007 23:34:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/977#comment:4" title="Comment 4">ismail@pardus.org.tr</a>: </p> <blockquote class="citation"> <p> Thats just a workaround, not a real fix, recently David Turner fixed ftjam for this bug. His changes could be backported. </p> </blockquote> <p> Do you have a reference for the changes that fix it? I'd really like to fix this in bjam but I've had no luck in finding out what's going wrong. </p> </description> <category>Ticket</category> </item> <item> <author>ismail@…</author> <pubDate>Sat, 07 Jul 2007 23:46:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:6</guid> <description> <p> <a class="ext-link" href="http://david.freetype.org/jam/ftjam-2.5.3rc2.tar.bz2"><span class="icon">​</span>http://david.freetype.org/jam/ftjam-2.5.3rc2.tar.bz2</a> is the fixed version as far as I know. For spesific changes you would have to ask David. </p> </description> <category>Ticket</category> </item> <item> <author>barner@…</author> <pubDate>Sun, 08 Jul 2007 09:27:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:7</guid> <description> <p> One more data point: </p> <p> g++42 (GCC) 4.2.1 20070627 (prerelease) does not exhibit this problem (tested on FreeBSD 6.2-STABLE/i386), while g++ (GCC) 4.2.0 20070514 [FreeBSD] (tested on FreeBSD 7.0/amd64) does. </p> <p> Since the original reporter also spoke about g++ 4.2.0, the problem seems to related to the compiler version, and not to the CPU architecture. In the debian bug report mentioned above someone reports the problem is present on i386 (with g++ 4.2.0). </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 08 Jul 2007 09:36:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:8</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/977#comment:7" title="Comment 7">barner@FreeBSD.org</a>: </p> <blockquote class="citation"> <p> One more data point: </p> <p> g++42 (GCC) 4.2.1 20070627 (prerelease) does not exhibit this problem (tested on FreeBSD 6.2-STABLE/i386), while g++ (GCC) 4.2.0 20070514 [FreeBSD] (tested on FreeBSD 7.0/amd64) does. </p> </blockquote> <p> Nice one! I tried with gcc version 4.2.1 20070627 (prerelease) (Pardus Linux), I can't produce the bug either. So looks like its fixed for gcc 4.2.1. </p> <p> Regards, ismail </p> </description> <category>Ticket</category> </item> <item> <author>bk@…</author> <pubDate>Tue, 24 Jul 2007 18:55:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:9</guid> <description> <p> Hm, this bug seems to be quite odd to reproduce. It reproduces here with this gcc: </p> <p> Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.1 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-<span class="underline">cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.2 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux Thread model: posix gcc version 4.2.1 20070705 (prerelease) (SUSE Linux) </span></p> <p> Other architectures with equivalent gcc also fail: i386 ia64, ppc, ppc64, s390, s390x (no platform to which we have works) </p> <p> Now the odd thing: It seems it worked with the same gcc version before, same sources, just in the previous rebuild of all openSUSE packages (I still try to verify this, as the boost-jam tarball has no testsuite, the segfault was not detected directly, only when trying to builld boost itself) </p> <p> The main change in gcc42 before that was an update from suse-gcc-4_2-branch head (<a class="missing changeset" title="No changeset 126079 in the repository">r126079</a>) to suse-gcc-4_2-branch head (<a class="missing changeset" title="No changeset 126359 in the repository">r126359</a>) </p> <p> glibc was changes to the lastest glibc-2.6 head, shortly before. </p> <p> Anyway, we are applying the change regarding-fno-strict-aliasing in our builds. </p> <p> If I'd have a vote, as that should not be a major performance isssue for jam, I'd just apply the workaround if you are not going to look for the real fix. Pity that you need yor own jam! </p> </description> <category>Ticket</category> </item> <item> <author>ismail@…</author> <pubDate>Mon, 30 Jul 2007 22:59:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:10</guid> <description> <p> Bad news, I can reproduce the bug with gcc 4.2.1 and boost 1.34.1 :( </p> </description> <category>Ticket</category> </item> <item> <author>jrowe@…</author> <pubDate>Wed, 22 Aug 2007 13:19:53 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:11</guid> <description> <p> I can also attest that gcc 4.2.1 and boost 1.34.1 produce this problem on a Sparc running Solaris 2.8. Adding -fno-strict-aliasing allows for success. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>René Rivera</dc:creator> <pubDate>Thu, 15 Nov 2007 18:39:13 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/977#comment:12 https://svn.boost.org/trac10/ticket/977#comment:12 <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> Alternate version of the patch <a href="https://svn.boost.org/trac10/trac/boost/changeset/41036">applied</a>. Still wish I could find the real cause of the problem :-( </p> Ticket anonymous Wed, 12 Mar 2008 14:49:05 GMT <link>https://svn.boost.org/trac10/ticket/977#comment:13 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:13</guid> <description> <p> This issue is still occurring for me with gcc 4.2.3 and boost 1.34.1 in Ubuntu. Using -fno-strict-aliasing fixed the problem. I thought it worth mentioning since apparently no recent gcc changes have cured the underlying problem, alas. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>ysfwdtg</dc:creator> <pubDate>Fri, 03 Oct 2008 22:20:23 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:14 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:14</guid> <description> <p> KFF8g4 &lt;a href="<a class="ext-link" href="http://hbapdhjrevdb.com/"><span class="icon">​</span>http://hbapdhjrevdb.com/</a>"&gt;hbapdhjrevdb&lt;/a&gt;, [url=<a class="ext-link" href="http://dnntzgtyxuyh.com/]dnntzgtyxuyh[/url"><span class="icon">​</span>http://dnntzgtyxuyh.com/]dnntzgtyxuyh[/url</a>], [link=<a class="ext-link" href="http://tvmirclgmorn.com/]tvmirclgmorn[/link"><span class="icon">​</span>http://tvmirclgmorn.com/]tvmirclgmorn[/link</a>], <a class="ext-link" href="http://azvamvfvjsgw.com/"><span class="icon">​</span>http://azvamvfvjsgw.com/</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Sun, 04 Dec 2011 07:59:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/977#comment:15 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/977#comment:15</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/977#comment:5" title="Comment 5">grafik</a>: </p> <blockquote class="citation"> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/977#comment:4" title="Comment 4">ismail@pardus.org.tr</a>: </p> <blockquote class="citation"> <p> Thats just a workaround, not a real fix, recently David Turner fixed ftjam for this bug. His changes could be backported. </p> </blockquote> <p> Do you have a reference for the changes that fix it? I'd really like to fix this in bjam but I've had no luck in finding out what's going wrong. </p> </blockquote> <p> I think the problem is casting to HASHDATA * *. I'll fix this properly soon. </p> </description> <category>Ticket</category> </item> </channel> </rss>