Author: James Kehl Date: To: yaffs Subject: [Yaffs] yaffs_tagscompat aliasing problem
Hi all,
The Yaffs1 tag ECC routine runs into aliasing problems when I compile it
with ARM GCC (CodeSourcery 2008q1-126), and causes the check routine to
flip random bits. I attach a fix (a slightly cleaner fix than
-fno-strict-aliasing!)
There are some other problems with the yaffs1 tag ECC: it can't cope
with a single bit error in the ECC data itself (it either causes
miscorrections, or makes the check routine return -1), and it only ever
uses 7 bits out of the 12 provided for ECC. Yaffs2 probably doesn't have
these problems, and I think Yaffs1 folk wouldn't want backwards
compatibility broken, so these remain unfixed :)
(This is unrelated to the problems I was seeing under mingw, btw)