[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081211110616.72f2d937@hskinnemoen-d830>
Date: Thu, 11 Dec 2008 11:06:16 +0100
From: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
To: Alex Raimondi <mailinglist@...omico.ch>
Cc: kernel@...32linux.org, linux-kernel@...r.kernel.org
Subject: Re: Segfault in fbcmap.c => Compiler bug?
Alex Raimondi wrote:
> if (transp)
> htransp = *transp++;
>
>
> The segfault happens at the if (transp) statment.
>
> Now to the strange thing, which makes me guess this may be a problem related to a compiler bug:
>
> When I change the if statment to:
>
> if (transp) {
> printk("e\n");
> htransp = *transp++;
> }
Yeah, as HC pointed out, this is caused by a buggy toolchain. Although
I don't have any disassembly to back it up, I'm willing to bet that it
will show an unconditional load followed by a conditional mov. The
printk() implies a barrier, which will prevent the faulty optimization
from happening.
Haavard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists