2008-06-08 12:41:59

by Mirco Tischler

[permalink] [raw]
Subject: Re: [BUG: 2.6.26-rc3] ERROR: "____ilog2_NaN" undefined

Here's an update:
I've contacted the gcc folks. Here is the bugzilla entry:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359
We were able to trace the error down to usb_submit_urb() in
drivers/usb/core/urb.c which calls ilog2() and the gcc falsely assumes its
argument (urb->interval) to be zero. But as I understood they say it's the
kernel's fault because the code depends on correct optimization what seems a
little weird for me as incorrect optimization is a gcc bug IMHO. But I am not
an expert and maybe I've just understood something wrong because I'm not a
native speaker.

Thanks
Mirco


Attachments:
signature.asc (189.00 B)

2008-06-09 22:16:22

by Greg KH

[permalink] [raw]
Subject: Re: [BUG: 2.6.26-rc3] ERROR: "____ilog2_NaN" undefined

On Sun, Jun 08, 2008 at 02:41:12PM +0200, Mirco Tischler wrote:
> Here's an update:
> I've contacted the gcc folks. Here is the bugzilla entry:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359
> We were able to trace the error down to usb_submit_urb() in
> drivers/usb/core/urb.c which calls ilog2() and the gcc falsely assumes its
> argument (urb->interval) to be zero. But as I understood they say it's the
> kernel's fault because the code depends on correct optimization what seems a
> little weird for me as incorrect optimization is a gcc bug IMHO. But I am not
> an expert and maybe I've just understood something wrong because I'm not a
> native speaker.

I'm confused how the kernel code could be at fault here.

How could it be fixed to not be at fault?

thanks,

greg k-h

2008-06-10 10:16:17

by Adrian Bunk

[permalink] [raw]
Subject: Re: [BUG: 2.6.26-rc3] ERROR: "____ilog2_NaN" undefined

On Mon, Jun 09, 2008 at 03:14:41PM -0700, Greg KH wrote:
> On Sun, Jun 08, 2008 at 02:41:12PM +0200, Mirco Tischler wrote:
> > Here's an update:
> > I've contacted the gcc folks. Here is the bugzilla entry:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359
> > We were able to trace the error down to usb_submit_urb() in
> > drivers/usb/core/urb.c which calls ilog2() and the gcc falsely assumes its
> > argument (urb->interval) to be zero. But as I understood they say it's the
> > kernel's fault because the code depends on correct optimization what seems a
> > little weird for me as incorrect optimization is a gcc bug IMHO. But I am not
> > an expert and maybe I've just understood something wrong because I'm not a
> > native speaker.
>
> I'm confused how the kernel code could be at fault here.
>
> How could it be fixed to not be at fault?

I'm quite sure this is (or was) a bug in gcc.

I'll update the gcc bug.

> thanks,
>
> greg k-h

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed