This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#6259 - Panic if queue overflows
Attached to Project:
Rockbox
Opened by Steve Bavin (pondlife) - Sunday, 29 October 2006, 17:42 GMT+2
Last edited by Steve Bavin (pondlife) - Wednesday, 01 August 2007, 17:05 GMT+2
Opened by Steve Bavin (pondlife) - Sunday, 29 October 2006, 17:42 GMT+2
Last edited by Steve Bavin (pondlife) - Wednesday, 01 August 2007, 17:05 GMT+2
|
DetailsHere's an additional test to force a panic if a queue overflows. Please can someone check my maths is right before I commit this, I wouldn't want to cause unwanted panic, and it seems to detect a lot of overflows on my H300.
|
This task depends upon
Closed by Steve Bavin (pondlife)
Wednesday, 01 August 2007, 17:05 GMT+2
Reason for closing: Rejected
Additional comments about closing: It's rather too easy to overflow a queue (by holding down a key during initial boot for example)... so this is probably not a good idea.
Wednesday, 01 August 2007, 17:05 GMT+2
Reason for closing: Rejected
Additional comments about closing: It's rather too easy to overflow a queue (by holding down a key during initial boot for example)... so this is probably not a good idea.
if(q->write == ((q->read + QUEUE_LENGTH) & QUEUE_LENGTH_MASK))
like e.g. in queue_post() at kernel.c:164 as you otherwise would point to somewhere outside of the queue?
(Note that I know nothing of the queuing stuff, but that simply popped into my mind as I read the patch so I might be completely wrong -- just wanted to note this :-)
if(q->read == q->write)
panicf("Queue overflowed id=%x", id);
As I understand it, q->read == q->write just indicates an empty queue, not an overflowed one.
p.s. Out of interest, my H340 always overflows on shutdown with the standard queue length of 16...
I'll commit this one soon unless anyone objects.