drh / lcc

The lcc retargetable ANSI C compiler
https://drh.github.io/lcc/
2.03k stars 442 forks source link

Fix memmove() #16

Open zturtleman opened 9 years ago

zturtleman commented 9 years ago

[The lcc source] overrides the libc memmove() with its own implementation, but that implementation fails to follow the specification. In particular, it returns NULL rather than memmove()'s first parameter.

GCC now optimizes based on this aspect of the specification, so things go wrong at runtime.

[Text & patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56881#c8]