From: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
To: Alex Raimondi <mailinglist@miromico.ch>
Cc: kernel@avr32linux.org, linux-kernel@vger.kernel.org
Subject: Re: Segfault in fbcmap.c => Compiler bug?
Date: Thu, 11 Dec 2008 11:06:16 +0100 [thread overview]
Message-ID: <20081211110616.72f2d937@hskinnemoen-d830> (raw)
In-Reply-To: <4940CE1F.5080605@miromico.ch>
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
prev parent reply other threads:[~2008-12-11 10:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-11 8:23 Alex Raimondi
2008-12-11 8:29 ` Hans-Christian Egtvedt
2008-12-11 9:09 ` Alex Raimondi
2008-12-11 9:26 ` Hans-Christian Egtvedt
2008-12-11 10:25 ` Alex Raimondi
2008-12-11 10:06 ` Haavard Skinnemoen [this message]
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=20081211110616.72f2d937@hskinnemoen-d830 \
--to=haavard.skinnemoen@atmel.com \
--cc=kernel@avr32linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailinglist@miromico.ch \
/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
all inboxes | Powered by JetHome®