Rockbox

Tasklist

FS#9164 - Possible fix for data aborts in buffering.c

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Monday, 07 July 2008, 15:53 GMT
Last edited by Magnus Holmgren (learman) - Friday, 11 July 2008, 13:37 GMT
Task Type Patches
Category Music playback
Status Closed
Assigned To No-one
Operating System SW-codec
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I've seen some data aborts in buffering.c in very specific circumstances on an e200 (using bookmarks on certain tracks, when dircache is enabled and album art is used). They all seem centered on the next field in memory_handle containing bad data. This patch tightens up the mutex locking in buffering.c a bit, and also fixes a bug in fill_buffer (m can be invalidated by the call to shrink_handle).

It seems to fix the data aborts, but since they only happened in such specific circumstances, I'm not certain the problem is fully fixed.

I'm not sure if the widened scope of the mutex lock in bufopen is really needed, but given that the loading of the album art can't allow anything to happen between add_handle and load_bitmap, it seems like a reasonable precaution (though perhaps it should only be done when actually loading a bitmap).
This task depends upon

Closed by  Magnus Holmgren (learman)
Friday, 11 July 2008, 13:37 GMT
Reason for closing:  Invalid
Additional comments about closing:  Found a better fix, I think.
Comment by Marc Guay (Marc_Guay) - Wednesday, 09 July 2008, 15:30 GMT
I received an Undefined Instruction error while trying to recreate the Data Abort (pressed play twice quickly at the splash screen and then select at the WPS). Cannot reproduce.

Loading...