<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://kerneltrap.org"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>KernelTrap - GCC</title>
 <link>http://kerneltrap.org/taxonomy/term/267/0</link>
 <description></description>
 <language>en-local</language>
<item>
 <title>Quote: Maybe I&#039;m Overly Pessimistic</title>
 <link>http://kerneltrap.org/Quote/Maybe_Im_Overly_Pessimistic</link>
 <description>&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;The C standard will eventually support concurrency (they are working on it), and it will almost inevitably be a horrible pile of stinking sh*t, and we&#039;ll continue to use the gcc inline asms instead, but then the gcc people will ignore our complaints when they break the compiler, and say that we should use the stinking pile-of-sh*t ones that are built in.&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Quote/Maybe_Im_Overly_Pessimistic&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Quote/Maybe_Im_Overly_Pessimistic#comments</comments>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://kerneltrap.org/Linux">Linux</category>
 <category domain="http://kerneltrap.org/quote">quote</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1092">Linus Torvalds</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1094">linux-kernel</category>
 <pubDate>Fri, 22 Aug 2008 02:53:07 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">16519 at http://kerneltrap.org</guid>
</item>
<item>
 <title>GCC 4.3.1, Bug Fixes</title>
 <link>http://kerneltrap.org/Tools/GCC_4.3.1_Bug_Fixes</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/taxonomy/term/10&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Develop_0.gif&quot; alt=&quot;Tools&quot; title=&quot;Tools&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;Jakub Jelinek announced the availability of &lt;a href=&quot;http://gcc.gnu.org/gcc-4.3/changes.html#4.3.1&quot;&gt;GCC 4.3.1&lt;/a&gt; saying, &quot;&lt;i&gt;GCC 4.3.1 is a bug-fix release, containing fixes for regressions in GCC 4.3.0 relative to previous GCC releases.&lt;/i&gt;&quot;  He adds the standard tag, &quot;&lt;i&gt;as always, a vast number of people contributed to this GCC release -- far too many to thank individually!&lt;/i&gt;&quot;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gcc.gnu.org/&quot; target=&quot;new&quot;&gt;GCC&lt;/a&gt; is the GNU Compiler Collection which includes C, C++, Objective-C, Fortran, Java, and Ada compilers. Download GCC 4.3.1 from your nearest gcc.gnu.org &lt;a href=&quot;http://gcc.gnu.org/mirrors.html&quot;&gt;mirror&lt;/a&gt;.&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Tools/GCC_4.3.1_Bug_Fixes&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Tools/GCC_4.3.1_Bug_Fixes#comments</comments>
 <category domain="http://kerneltrap.org/taxonomy/term/287">Ada</category>
 <category domain="http://kerneltrap.org/C">C</category>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/taxonomy/term/285">Fortran</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/GCC_4">GCC 4</category>
 <category domain="http://kerneltrap.org/GCC_4.3.1">GCC 4.3.1</category>
 <category domain="http://kerneltrap.org/GNU">GNU</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1277">Jakub Jelinek</category>
 <category domain="http://kerneltrap.org/Java">Java</category>
 <category domain="http://kerneltrap.org/taxonomy/term/284">Objective-C</category>
 <category domain="http://kerneltrap.org/release">release</category>
 <category domain="http://kerneltrap.org/taxonomy/term/10">Tools</category>
 <pubDate>Tue, 10 Jun 2008 08:20:14 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">16260 at http://kerneltrap.org</guid>
</item>
<item>
 <title>GCC 4.2.4, Bug Fix Release</title>
 <link>http://kerneltrap.org/GCC/4.2.4_Bug_Fix_Release</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/taxonomy/term/10&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Develop_0.gif&quot; alt=&quot;Tools&quot; title=&quot;Tools&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;Joseph Myers announced the availability of &lt;a href=&quot;http://gcc.gnu.org/gcc-4.2/&quot;&gt;GCC 4.2&lt;/a&gt;.4 saying, &quot;&lt;i&gt;GCC 4.2.4 is a bug-fix release, containing fixes for regressions in GCC 4.2.3 relative to previous GCC releases.&lt;/i&gt;&quot;  He adds, &quot;&lt;i&gt;as always, a vast number of people contributed to this GCC release -- far too many to thank individually!&lt;/i&gt;&quot;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gcc.gnu.org/&quot; target=&quot;new&quot;&gt;GCC&lt;/a&gt; is the GNU Compiler Collection which includes C, C++, Objective-C, Fortran, Java, and Ada compilers. Download GCC 4.2.4 from your nearest gcc.gnu.org &lt;a href=&quot;http://gcc.gnu.org/mirrors.html&quot;&gt;mirror&lt;/a&gt;.&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/GCC/4.2.4_Bug_Fix_Release&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/GCC/4.2.4_Bug_Fix_Release#comments</comments>
 <category domain="http://kerneltrap.org/taxonomy/term/287">Ada</category>
 <category domain="http://kerneltrap.org/C">C</category>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/taxonomy/term/285">Fortran</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/GCC_4">GCC 4</category>
 <category domain="http://kerneltrap.org/GCC_4.2.4">GCC 4.2.4</category>
 <category domain="http://kerneltrap.org/GNU">GNU</category>
 <category domain="http://kerneltrap.org/Java">Java</category>
 <category domain="http://kerneltrap.org/Joseph_Myers">Joseph Myers</category>
 <category domain="http://kerneltrap.org/taxonomy/term/284">Objective-C</category>
 <category domain="http://kerneltrap.org/release">release</category>
 <category domain="http://kerneltrap.org/taxonomy/term/10">Tools</category>
 <pubDate>Wed, 21 May 2008 21:41:10 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">16183 at http://kerneltrap.org</guid>
</item>
<item>
 <title>GCC 4.2.3, Bug Fix Release</title>
 <link>http://kerneltrap.org/GCC/4.2.3_Bug_Fix_Release</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;Joseph Myers announced the availability of &lt;a href=&quot;http://gcc.gnu.org/gcc-4.2/&quot;&gt;GCC 4.2&lt;/a&gt;.3 saying, &quot;&lt;i&gt;GCC 4.2.3 is a bug-fix release, containing fixes for regressions in GCC 4.2.2 relative to previous GCC releases.&lt;/i&gt;&quot;  He adds, &quot;&lt;i&gt;as always, a vast number of people contributed to this GCC release -- far too many to thank individually!&lt;/i&gt;&quot;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gcc.gnu.org/&quot; target=&quot;new&quot;&gt;GCC&lt;/a&gt; is the GNU Compiler Collection which includes C, C++, Objective-C, Fortran, Java, and Ada compilers. Download GCC 4.2.3 from your nearest gcc.gnu.org &lt;a href=&quot;http://gcc.gnu.org/mirrors.html&quot;&gt;mirror&lt;/a&gt;.&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/GCC/4.2.3_Bug_Fix_Release&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/GCC/4.2.3_Bug_Fix_Release#comments</comments>
 <category domain="http://kerneltrap.org/taxonomy/term/287">Ada</category>
 <category domain="http://kerneltrap.org/C">C</category>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/taxonomy/term/285">Fortran</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/GCC_4">GCC 4</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1186">GCC 4.2.3</category>
 <category domain="http://kerneltrap.org/GNU">GNU</category>
 <category domain="http://kerneltrap.org/Java">Java</category>
 <category domain="http://kerneltrap.org/Joseph_Myers">Joseph Myers</category>
 <category domain="http://kerneltrap.org/taxonomy/term/284">Objective-C</category>
 <category domain="http://kerneltrap.org/release">release</category>
 <category domain="http://kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Mon, 04 Feb 2008 07:33:38 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">15415 at http://kerneltrap.org</guid>
</item>
<item>
 <title>C Semantics, Constants and Pointers</title>
 <link>http://kerneltrap.org/Linux/C_Semantics_Constants_and_Pointers</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;&#039;Const&#039; has *never* been about the thing not being modified. Forget all that claptrap. C does not have such a notion,&lt;/i&gt;&quot; began Linus Torvalds, responding to a query about why kfree() takes a const pointer.  He continued, &quot;&lt;i&gt;&#039;const&#039; is a pointer type issue, and is meant to make certain mis-uses more visible at compile time. It has *no* other meaning, and anybody who thinks it has is just setting himself up for problems.&lt;/i&gt;&quot;  He offered two explanations, beginning with simple C semantics, &quot;&lt;i&gt;from a very obvious and very *real* caller perspective, &#039;free()&#039; really doesn&#039;t change the thing the pointer points to. It does something totally different: it makes the *pointer* itself invalid.&lt;/i&gt;&quot;  He then added his second reason, &quot;&lt;i&gt;anything that *can* take a const pointer should always do so.  Why? Because we want the types to be as tight as possible, and normal code should need as few casts as possible.&lt;/i&gt;&quot;  When it was pointed out that GCC 4.2 displays warnings when casting a const pointer to a non-const, Linus replied:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Either don&#039;t use a broken compiler (casting a const pointer to a non-const is definitely not a bug), or cast to &#039;unsigned long&#039; (if it still complains, now the compiler is not just stupid, it&#039;s broken).  The whole point of memory management is that we know how pointers work, and understand that they have a *bit* representation, not just the C semantics.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Linux/C_Semantics_Constants_and_Pointers&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Linux/C_Semantics_Constants_and_Pointers#comments</comments>
 <category domain="http://kerneltrap.org/C">C</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://kerneltrap.org/Linux">Linux</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1165">semantics</category>
 <category domain="http://kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Thu, 17 Jan 2008 22:20:06 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">15255 at http://kerneltrap.org</guid>
</item>
<item>
 <title>Fixing Compiler Misoptimizations</title>
 <link>http://kerneltrap.org/Linux/Fixing_Compiler_Misoptimizations</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;An earlier discussion about GCC &lt;a href=&quot;http://kerneltrap.org/Linux/Compiler_Misoptimizations&quot;&gt;compiler misoptimizations&lt;/a&gt; led Linus Torvalds to note, &quot;&lt;i&gt;I&#039;m very ambivalent about gcc.&lt;/i&gt;&quot;  He explained that on one hand he feels it&#039;s a great compiler with many great developers, but being an old project, &quot;&lt;i&gt;it has accumulated cruft over time, and cleaning things up is often almost impossible.&lt;/i&gt;&quot;  He added that while compiler bugs can be frustrating, his real concern with the project remains in how some of the developers enforce language definition, &quot;&lt;i&gt;and seem to think that it&#039;s more important to read the language spec like a lawyer than it is to solve actual user problems.&lt;/i&gt;&quot;&lt;/p&gt;
&lt;p&gt;Andrew Haley noted that there is an active group of developers trying to improve GCC, requesting, &quot;&lt;i&gt;give us a chance.&lt;/i&gt;&quot;  Returning to the original compiler misoptimization that started the whole discussion, he noted that a fix was being committed to all open GCC branches, &quot;&lt;i&gt;we&#039;re back-porting the patch to all open branches.  However, this patch only affects one particular case where gcc introduces a data race; we&#039;re sure there are others not fixed.&lt;/i&gt;&quot;  Andrew also noted that they were actively continuing to audit the code to find and remove similar optimization bugs.&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Linux/Fixing_Compiler_Misoptimizations&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Linux/Fixing_Compiler_Misoptimizations#comments</comments>
 <category domain="http://kerneltrap.org/taxonomy/term/1128">Andrew Haley</category>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://kerneltrap.org/Linux">Linux</category>
 <category domain="http://kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Mon, 05 Nov 2007 04:09:25 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">14736 at http://kerneltrap.org</guid>
</item>
<item>
 <title>Compiler Misoptimizations</title>
 <link>http://kerneltrap.org/Linux/Compiler_Misoptimizations</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;Basically, what the gcc developers are saying is that gcc is free to load and store to any memory location, so long as it behaves as if the instructions were executed in sequence,&lt;/i&gt;&quot; &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2007/10/25/353777&quot;&gt;Nick Piggin noted&lt;/a&gt;, describing a linked discussion on the GCC development mailing list.  He explained his concerns, &quot;&lt;i&gt;for x86, obviously the example above shows it can be miscompiled, but it is probably relatively hard to make it happen for a non trivial sequence. For an ISA with lots of predicated instructions like ia64, it would seem to be much more likely. But of course we don&#039;t want even the possibility of failures.  The gcc guys seem to be saying to mark everything volatile that could be touched in a critical section. This is insane for Linux.&lt;/i&gt;&quot;  Linus Torvalds reflected:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Are you surprised?  The gcc developers seem to have had a total disregard for what people want or need, and every time some code generation issue comes up, there&#039;s a lot of people on the list that do language-lawyering, rather than admit that there might be a problem.  &lt;/p&gt;
&lt;p&gt;&quot;It&#039;s happened before, it will happen again. I don&#039;t think it&#039;s true of all gcc developers (or even most, I hope), but it&#039;s common enough. For some reason, compiler developers seem to be far enough removed from &#039;real life&#039; that they have a tendency to talk in terms of &#039;this is what the spec says&#039; rather than &#039;this is a problem&#039;.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Linux/Compiler_Misoptimizations&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Linux/Compiler_Misoptimizations#comments</comments>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://kerneltrap.org/Linux">Linux</category>
 <category domain="http://kerneltrap.org/Nick_Piggin">Nick Piggin</category>
 <category domain="http://kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Thu, 25 Oct 2007 19:23:50 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">14679 at http://kerneltrap.org</guid>
</item>
<item>
 <title>GCC 4.2.2 Released</title>
 <link>http://kerneltrap.org/GCC/4.2.2_Released</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;Mark Mitchell announced the availability of &lt;a href=&quot;http://gcc.gnu.org/gcc-4.2/&quot;&gt;GCC 4.2&lt;/a&gt;.2 saying, &quot;&lt;i&gt;GCC 4.2.2 is a bug-fix release, containing fixes for regressions in GCC 4.2.1 relative to previous GCC releases.&lt;/i&gt;&quot;  He adds, &quot;&lt;i&gt;the compilers in this release are covered by GNU General Public License version 3,&lt;/i&gt;&quot; making GCC 4.2.2 the first released under the &lt;a href=&quot;http://kerneltrap.org/GPLv3&quot;&gt;GPLv3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://gcc.gnu.org/&quot; target=&quot;new&quot;&gt;GCC&lt;/a&gt; is the GNU Compiler Collection which includes C, C++, Objective-C, Fortran, Java, and Ada compilers. Download GCC 4.2.2 from your nearest gcc.gnu.org &lt;a href=&quot;http://gcc.gnu.org/mirrors.html&quot;&gt;mirror&lt;/a&gt;.&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/GCC/4.2.2_Released&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/GCC/4.2.2_Released#comments</comments>
 <category domain="http://kerneltrap.org/taxonomy/term/287">Ada</category>
 <category domain="http://kerneltrap.org/C">C</category>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/taxonomy/term/285">Fortran</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/GCC_4">GCC 4</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1058">GCC 4.2.2</category>
 <category domain="http://kerneltrap.org/GNU">GNU</category>
 <category domain="http://kerneltrap.org/GPLv3">GPLv3</category>
 <category domain="http://kerneltrap.org/Java">Java</category>
 <category domain="http://kerneltrap.org/taxonomy/term/288">Mark Mitchell</category>
 <category domain="http://kerneltrap.org/taxonomy/term/284">Objective-C</category>
 <category domain="http://kerneltrap.org/release">release</category>
 <category domain="http://kerneltrap.org/taxonomy/term/177">Applications and Utilities</category>
 <pubDate>Wed, 10 Oct 2007 06:52:16 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">14549 at http://kerneltrap.org</guid>
</item>
<item>
 <title>Compiler Optimization Bugs and World Domination</title>
 <link>http://kerneltrap.org/Linux/Compiler_Optimization_Bugs_and_World_Domination</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;A &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2007/10/3/328186&quot;&gt;bug report&lt;/a&gt; filed by Ingo Molnar regarding a procfs crash in the recently released 2.6.23-rc9 kernel was quickly tracked down by Linus Torvalds as a compiler bug.  The bug was ultimately determined to be from a compiler optimization generated with an older version of GCC.  Ingo was skeptical at first, &quot;&lt;i&gt;it&#039;s 4.0.2. Not the latest &amp;amp; greatest but I&#039;ve been using it for 2 years and this would be the first time it miscompiles a 32-bit kernel out of tens of thousands of successful kernel bootups.&lt;/i&gt;&quot;  Linus replied, &quot;&lt;i&gt;I am 100% sure. I can look at the disassembly, and point to the fact that your Oops happens on code that is simply totally bogus.&lt;/i&gt;&quot;  He continued on to offer an &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2007/10/3/328472&quot;&gt;interesting review of the crash&lt;/a&gt;, explaining line by line what should have been generated versus what actually was, causing the crash.  In the end, Ingo switched to a distribution compiled GCC 4.1.2 and confirmed that the crash went away, &quot;&lt;i&gt;so you are completely right, it&#039;s a compiler bug in 4.0.2.&lt;/i&gt;&quot;&lt;/p&gt;
&lt;p&gt;During the thread, Linus suggested that the optimization made by the compiler wasn&#039;t &quot;legal&quot;, to which Alan Cox retorted, &quot;&lt;i&gt;pedant: valid. Almost all optimizations are legal, nobody has yet written laws about compilers. Sorry but I&#039;m forever fixing misuse of the word &#039;illegal&#039; in printks, docs and the like and it gets annoying after a bit.&lt;/i&gt;&quot;  Linus playfully responded, &quot;&lt;i&gt;heh.  When I&#039;m ruler of the universe, it *will* be illegal. I&#039;m just getting a bit ahead of myself.&lt;/i&gt;&quot;  When asked how long until he expected to be ruler, Linus added, &quot;&lt;i&gt;I&#039;m working on it, I&#039;m working on it. I&#039;m just as frustrated as you are.  It turns out to be a non-trivial problem.&lt;/i&gt;&quot;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Linux/Compiler_Optimization_Bugs_and_World_Domination&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Linux/Compiler_Optimization_Bugs_and_World_Domination#comments</comments>
 <category domain="http://kerneltrap.org/2.6.23">2.6.23</category>
 <category domain="http://kerneltrap.org/Alan_Cox">Alan Cox</category>
 <category domain="http://kerneltrap.org/bugs">bugs</category>
 <category domain="http://kerneltrap.org/compiler">compiler</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/taxonomy/term/738">GCC 4.0.2</category>
 <category domain="http://kerneltrap.org/taxonomy/term/1040">GCC 4.1.2</category>
 <category domain="http://kerneltrap.org/Ingo_Molnar">Ingo Molnar</category>
 <category domain="http://kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://kerneltrap.org/Linux">Linux</category>
 <category domain="http://kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Fri, 05 Oct 2007 09:09:36 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">14519 at http://kerneltrap.org</guid>
</item>
<item>
 <title>2.4.36-pre1, Preventing NULL Dereferences</title>
 <link>http://kerneltrap.org/Linux/2.4.36-pre1_Preventing_NULL_Dereferences</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;I&#039;ve just released Linux 2.4.36-pre1&lt;/i&gt;,&quot; announced 2.4 maintainer Willy Tarreau.  He described a new feature found in the first pre-release:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;In private discussions, Solar Designer proposed to restrict the ability to map the NULL address to CAP_RAW_IO capable processes only. The idea behind this was to prevent &#039;normal&#039; users from trying to exploit NULL dereferences in the kernel which have not been discovered yet. This is purely a preventive measure.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Willy added that a similar feature exists in the 2.6 kernel, &quot;&lt;i&gt;Chris Wright noted that 2.6 already has a somewhat similar feature brought by Eric Paris, which introduces a sysctl by which the admin can set the lower mappable address.&lt;/i&gt;&quot;  He also noted that the feature can be disabled, &quot;&lt;i&gt;Alan Cox indicated that it was desirable to be able to dynamically disable the feature because some (very) rare programs map the NULL pointer to speed up their walk through linked lists by avoiding NULL pointer checks.&lt;/i&gt;&quot;  Finally he asked for testers, &quot;&lt;i&gt;please report any breakage you would detect when enabling it. We&#039;re pretty confident that almost every applications will not see any difference since no normal application maps NULL. But it would be interesting to identify the &quot;special&quot; ones.&lt;/i&gt;&quot;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://kerneltrap.org/Linux/2.4.36-pre1_Preventing_NULL_Dereferences&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://kerneltrap.org/Linux/2.4.36-pre1_Preventing_NULL_Dereferences#comments</comments>
 <category domain="http://kerneltrap.org/-pre">-pre</category>
 <category domain="http://kerneltrap.org/-pre1">-pre1</category>
 <category domain="http://kerneltrap.org/2.4">2.4</category>
 <category domain="http://kerneltrap.org/2.4.36">2.4.36</category>
 <category domain="http://kerneltrap.org/Alan_Cox">Alan Cox</category>
 <category domain="http://kerneltrap.org/Chris_Wright">Chris Wright</category>
 <category domain="http://kerneltrap.org/GCC">GCC</category>
 <category domain="http://kerneltrap.org/Linux">Linux</category>
 <category domain="http://kerneltrap.org/Willy_Tarreau">Willy Tarreau</category>
 <category domain="http://kerneltrap.org/news/linux">Linux news</category