Re: Segfault in fbcmap.c => Compiler bug?
From: Haavard Skinnemoen
Date: Thu Dec 11 2008 - 05:28:54 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/