--- old/src/share/vm/utilities/copy.cpp Wed Jun 9 10:46:11 2010 +++ new/src/share/vm/utilities/copy.cpp Wed Jun 9 10:46:11 2010 @@ -28,6 +28,7 @@ // Copy bytes; larger units are filled atomically if everything is aligned. void Copy::conjoint_memory_atomic(void* from, void* to, size_t size) { + if (size == 0) return; address src = (address) from; address dst = (address) to; uintptr_t bits = (uintptr_t) src | (uintptr_t) dst | (uintptr_t) size; @@ -55,6 +56,7 @@ // Fill bytes; larger units are filled atomically if everything is aligned. void Copy::fill_to_memory_atomic(void* to, size_t size, jubyte value) { + if (size == 0) return; address dst = (address) to; uintptr_t bits = (uintptr_t) to | (uintptr_t) size; if (bits % sizeof(jlong) == 0) {