Re: Kernel 2.2.17 with RedHat 7 Problem !

From: Jakub Jelinek (jakub@redhat.com)
Date: Tue Oct 24 2000 - 01:16:44 EST


On Mon, Oct 23, 2000 at 12:06:31PM +0000, David Wragg wrote:
> Gregory Maxwell <greg@linuxpower.cx> writes:
> > If 2.96 is broken, I'd appreciate it if you would describe the breakage.
>
> As in the RedHat 2.96? Try compiling the following on RedHat 7.0 x86
> with "gcc -O2" and take a look at the generated code. Nice, isn't it?
>
>
> #include <sys/time.h>
>
> void foo(void)
> {
> struct itimerval iv;
>
> iv.it_interval.tv_sec = 0;
> iv.it_interval.tv_usec = 250000;
> iv.it_value = iv.it_interval;
>
> setitimer(ITIMER_REAL, &iv, NULL);
> }

Yes, this is a bug in the compiler (which I hope to fix today, CVS gcc is
broken as well), though the actual place which causes this to be miscompiled
is in the system headers where a restrict keyword is used on an incomplete
struct timeval forward definitions pointer and due to bug is set in the type
structure itself (at least that's my guess, need to run it under debugger
today - but if the select prototype is moved after the full struct timeval
definition, everything works correctly). Note that gcc 2.95.2 has some
restrict keyword related bugs as well (which glibc had to work around in
the headers; the bug was in 2.95.x only), it is not just 2.96.

        Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:13 EST