[ECOS] JFFS2 Garbage Collection Error? (NO! rbtree.c bug)

Scott Wilkinson scott@alliantnetworks.com
Mon Jul 14 17:07:00 GMT 2003


On Sun, 2003-07-13 at 10:55, David Woodhouse wrote:
> On Sat, 2003-07-12 at 23:55, Scott Wilkinson wrote: 
> > If, for testing purposes, I compile eCos using the linux rbtree.[ch]
> > instead of the eCos/OpenBSD port, my JFFS2 stuff works (and very well so
> > far I might add!).
> 
> I note the trees dumped before the call to rb_erase() and the crash are
> identical in the Linux and eCos versions -- it doesn't seem to be an
> error in _building_ the tree, only removing stuff from it.
> 
> I note further that your test case also works if I take the Linux
> rb_erase() function and drop it into the BSD/eCos rbtree.c, adjusting
> name and order of rb_remove_color() and its arguments respectively.
> 

I believe I fixed the bug in the eCos rbtree.c that was causing JFFS2 to
fail during certain garbage collection events.  It was a simple problem
of copying pointers to structures instead of copying the entire
structure itself, as is necessary.

I am continuing to test, but the attached patch seems to do the trick!

Scott


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rbtree.c.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20030714/7222e998/attachment.bin>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


More information about the Ecos-discuss mailing list