[coreboot] libpayload/libc/memory.c copied from buggy HelenOS code
jirik.svoboda at seznam.cz
Thu Feb 5 09:46:18 CET 2009
Hi there folks,
my name is Jiri Svoboda, of HelenOS project. While it delights us that Coreboot makes use of some of our code, I'd like to warn you that the memxxx() operations in libpayload/libc/memory.c you copied from the HelenOS C library are terribly flawed. They have been fixed in HelenOS since. So I'd suggest either syncing with our code or re-writing them or something. More specifically:
memmove() - this is completely wrong. It will fail when moving by less than 4 bytes.
memcpy() and memmove() - both will only work on word-aligned blocks on non-Intel platforms (this may not be a concern to you)
If you don't care about non-Intel, the easiest way would be to copy a recent version of memmove() from our trunk and that should do the trick - remove the problem when moving by less than word size.
Note that I'm not on this mailing list. If you want to reach me, Cc me.
More information about the coreboot