linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix undefined/miscompiled construct in kernel parameters
Date: Sun, 15 Jun 2003 10:24:13 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0306151021440.8088-100000@home.transmeta.com> (raw)
In-Reply-To: <m3of0zdzuz.fsf@averell.firstfloor.org>


On Sun, 15 Jun 2003, Andi Kleen wrote:
>
> Because &arbitary_symbol_a - &arbitary_symbol_b is undefined in C and
> the amd64 gcc 3.2 choses to miscompile it (it results in a very big  
> number because it converts the 56/40 division to an inversed multiplication
> in a wrong way). I actually wrote a compiler bug report first, but the 
> compiler developers rightly pointed out that it is undefined.

They are not arbitrary symbols. They are symbols in the same data 
structure, set up by the linker script. Gcc doesn't know that, but the 
fact that gcc doesn't know doesn't mean that gcc should be lazy and 
doesn't really excuse buggy code.

The gcc developers you talked to are picking their legalistic noses, and 
it's sad that this isn't exactly the first time it has happened.

		Linus


  reply	other threads:[~2003-06-15 17:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030615131004$6a85@gated-at.bofh.it>
     [not found] ` <20030615170013$4ebc@gated-at.bofh.it>
2003-06-15 17:17   ` [PATCH] Fix undefined/miscompiled construct in kernel parameters Andi Kleen
2003-06-15 17:24     ` Linus Torvalds [this message]
2003-06-15 17:32       ` Andi Kleen
2003-06-15 17:48         ` Roman Zippel
2003-06-15 18:28           ` Andi Kleen
2003-06-15 22:56           ` Richard Henderson
2003-06-15 12:58 Andi Kleen
2003-06-15 16:52 ` Linus Torvalds
2003-06-16  0:23   ` Rusty Russell
2003-06-16  0:49     ` Richard Henderson
2003-06-16  3:55       ` Rusty Russell
2003-06-16  2:44     ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0306151021440.8088-100000@home.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).