Index: src/platform-posix.cc |
diff --git a/src/platform-posix.cc b/src/platform-posix.cc |
index 48898ed9aad0acdb4cc06ccba4b01c9818f26de4..9f650d1e5b5c3b7bcad6ee53fc2b8921cad7580a 100644 |
--- a/src/platform-posix.cc |
+++ b/src/platform-posix.cc |
@@ -334,6 +334,7 @@ OS::MemMoveFunction CreateMemMoveFunction(); |
// Copy memory area. No restrictions. |
void OS::MemMove(void* dest, const void* src, size_t size) { |
+ if (size == 0) return; |
// Note: here we rely on dependent reads being ordered. This is true |
// on all architectures we currently support. |
(*memmove_function)(dest, src, size); |