You can call it "crap software" all you like, but the thing is, if memcpy doesn't warn about overlaps, there's no test coverage, and in that case even well-designed software will have bugs.Баг остается открытым.
Then the question becomes one of "Why break it?"
"Quite frankly, I find your attitude to be annoying and downright stupid.
How hard can it be to understand the following simple sentence:
THE USER DOESN'T CARE."
A much better workaround is likely to just implement memcpy() as memmove() (you can replace the inline asm by that in my preload example if you want to). Once memcpy() isn't small and trivial any more, that's just the right thing to do.
The fact that the glibc people don't do that, and that this hasn't been elevated despite clearly being a big usability problem (normal users SHOULD NOT HAVE TO google bugzillas and play with LD_PRELOAD to have a working system), is just sad.
Quite frankly, there is no reason for the current memcpy() mess. There is no _technical_ reason for it, and there is certainly no usability reason for it. Why the Fedora people don't just fix it, I don't understand. It's a shame and a disgrace.
The fact that Adobe does something that isn't technically right is no excuse
for having a sub-par crap memcpy() implementation.
If you don't like it, you're simply using the wrong distribution.
The 32-bit flash plugin works fine. Y'all are lucky we tacitly support the
32-bit Flash plugin as much as we do.
"The ANSI C standard defines two functions: memcpy , which is fast but might overwrite memory if source and destination overlap; and memove, which might be slower but will always be correct. The burden of choosing correctness over speed should not be placed upon the programmer; there should be only one function."
Torvalds, Kernighan, Pike: 1
glibc developers: 0
DNS Prefetching Implications. deviantart use a subdomain per user, which meant the DNS prefetching feature in Firefox and Chrome was costing them an extra 10 billion DNS queries per month. Disabling it with a meta tag saves them $1600/month in DNS service charges.