md5sum makes unaligned word accesses...
Mike Frysinger
vapier at gentoo.org
Fri May 12 04:43:41 UTC 2006
On Thursday 11 May 2006 12:22, Rob Landley wrote:
> On Thursday 11 May 2006 2:05 am, Andre wrote:
> > Anyway, comparing the faulting PC with a disassembly of busybox, it
> > looks like the fault happens in md5_hash_block()
> >
> > void md5_hash_block(const void *buffer, size_t len, md5_ctx_t *ctx)
> > {
> > uint32_t correct_words[16];
> > const uint32_t *words = buffer;
> > ....
> >
> > Casting a void * to an unsigned int * is highly suspect unless all
> > callers of md5_has_block() somehow know that 'buffer' has implicit
> > alignment constraints...
considering there is only one caller of md5_has_block(), this is possible
or in md5_hash_block(), make use of posix_memalign()
> But it doesn't on any other platform.
alignment issues arent arm-specific
> Looks like we need to add some thing like this to plaform.h:
garbage
-mike
More information about the busybox
mailing list