* file kernel/signal.c, 2 * array subscript out of range
@ 2005-07-30 8:17 d binderman
2005-07-30 16:32 ` Randy.Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: d binderman @ 2005-07-30 8:17 UTC (permalink / raw)
To: linux-kernel
Hello there,
I just tried to compile Redhat Fedora package
kernel-2.6.12-1.1435_FC5 with the Intel C compiler version 8.1
The compiler said
kernel/signal.c(196): warning #175: subscript out of range
The source code is
case 4: ready = signal->sig[3] &~ blocked->sig[3];
Clearly broken code. Array sig has only _NSIG_WORDS elements,
which is set to two on this architecture.
Suggest rework code to use _NSIG_WORDS as the upper limit, not
a fixed constant.
The compiler also said
kernel/signal.c(197): warning #175: subscript out of range
on the next line of source code.
Regards
David Binderman
_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: file kernel/signal.c, 2 * array subscript out of range
2005-07-30 8:17 file kernel/signal.c, 2 * array subscript out of range d binderman
@ 2005-07-30 16:32 ` Randy.Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2005-07-30 16:32 UTC (permalink / raw)
To: d binderman; +Cc: linux-kernel
On Sat, 30 Jul 2005 08:17:48 +0000 d binderman wrote:
> Hello there,
>
> I just tried to compile Redhat Fedora package
> kernel-2.6.12-1.1435_FC5 with the Intel C compiler version 8.1
>
> The compiler said
>
> kernel/signal.c(196): warning #175: subscript out of range
>
> The source code is
>
> case 4: ready = signal->sig[3] &~ blocked->sig[3];
>
> Clearly broken code. Array sig has only _NSIG_WORDS elements,
> which is set to two on this architecture.
so that line (case 4, where 4 is _NSIG_WORDS) won't ever be
executed on this arch...
This is arch-independent code and it handles a variety of
values for _NSIG_WORDS. I don't see a problem.
On "this architecture," case 2: will be executed:
case 2: ready = signal->sig[1] &~ blocked->sig[1];
ready |= signal->sig[0] &~ blocked->sig[0];
break;
> Suggest rework code to use _NSIG_WORDS as the upper limit, not
> a fixed constant.
>
> The compiler also said
>
> kernel/signal.c(197): warning #175: subscript out of range
>
> on the next line of source code.
---
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-30 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-30 8:17 file kernel/signal.c, 2 * array subscript out of range d binderman
2005-07-30 16:32 ` Randy.Dunlap
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®