This is the mail archive of the
ecos-bugs@sources.redhat.com
mailing list for the eCos project.
[Bug 1000106] New: Infinite loop in extended interrupt handling
- From: bugzilla at ecoscentric dot com
- To: ecos-bugs at sources dot redhat dot com
- Date: Fri, 30 Jul 2004 14:09:16 +0100 (BST)
- Subject: [Bug 1000106] New: Infinite loop in extended interrupt handling
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000106
Summary: Infinite loop in extended interrupt handling
Product: eCos
Version: 2.0
Platform: refidt334 (MIPS IDT79S334A reference platform)
OS/Version: All
Status: UNCONFIRMED
Severity: critical
Priority: normal
Component: HAL
AssignedTo: jifl@ecoscentric.com
ReportedBy: jerome.souquieres@kis.fr
QAContact: ecos-bugs@sources.redhat.com
In file "packages/hal/mips/idt32334/v2_0/src/var_intr.c", the hal_extended_isr()
function contains the following loop, which goal is to test each bit of the
pending interrupt register:
for (isrNum=0; isrNum <=31; isrNum)
if ( (1 << isrNum) & pendingIsr)
break;
This turns to be an infinite loop most of the time, because a ++ is missing for
isrNum.
In addition, this loop could be optimised because there is no need to check
every 32 bits of this register. According to the documention of the IDT32334
processor, only bits 1 to 14 are actually used. All in all, this loop should be
changed to:
for (isrNum=1; isrNum <=14; ++isrNum)
if ( (1 << isrNum) & pendingIsr)
break;
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.