[patch] ext2fs freeze/corruption on amd64
Jaakko Heinonen
jh at saunalahti.fi
Sun Jan 4 23:50:14 PST 2009
On 2009-01-04, Kostik Belousov wrote:
> Please note that find_next_zero_bit() uses gcc extension to perform
> void-pointer arithmetic. Also, at the +2 line, it performs unaligned
> access to the uint32_t entities.
76 find_next_zero_bit(void *data, size_t sz, size_t ofs)
77 {
78 uint32_t *p;
79 uint32_t mask;
80 int bit;
81
82 p = (uint32_t*)data + (ofs >> 5);
Hmmm, I don't think so. Did you notice that the type of p is uint32_t *
(line 78) and that data is casted to uint32_t * for pointer arithmetic
(line 82)?
Thank you for looking at this.
--
Jaakko
More information about the freebsd-fs
mailing list