Your new test fail: C:\>test -test.v === RUN TestRead --- PASS: TestRead (0.80 seconds) === RUN TestReadEmpty --- PASS: TestReadEmpty (0.00 seconds) panic: runtime error: index out of range [recovered] panic: runtime error: index out of range goroutine 4 [running]: testing.func-+003(0x30e747d4, 0x30e73900) /root/go/root/src/pkg/testing/testing.go:292 +0x12b ----- stack segment boundary ----- crypto/rand.(*rngReader).Read(0x10e6a0d0, 0x59ee20, 0x0, 0x0, 0x0, ...) /root/go/root/src/pkg/crypto/rand/rand_windows.go:38 +0x2a8 crypto/rand.TestReadEmpty(0x10e6fd20, 0xe) /root/go/root/src/pkg/crypto/rand/rand_test.go:35 +0x69 testing.tRunner(0x10e6fd20, 0x59b02c, 0x0) /root/go/root/src/pkg/testing/testing.go:297 +0x70 created by testing.RunTests /root/go/root/src/pkg/testing/testing.go:373 +0x781 goroutine 1 [chan receive]: testing.RunTests(0x401000, 0x59b020, 0x2, 0x2, 0x30e71701, ...) /root/go/root/src/pkg/testing/testing.go:374 +0x7bf testing.Main(0x401000, 0x59b020, 0x2, 0x2, 0x59ea28, ...) /root/go/root/src/pkg/testing/testing.go:309 +0x68 main.main() crypto/rand/_test/_testmain.go:49 +0x80 goroutine 2 [syscall]: created by runtime.main /root/go/root/src/pkg/runtime/proc.c:220 C:\> You should fix rand_windows.go. Just check slice length an bail out if zero. Alex http://codereview.appspot.com/6497105/diff/1001/src/pkg/crypto/rand/rand_test.go File src/pkg/crypto/rand/rand_test.go (right): http://codereview.appspot.com/6497105/diff/1001/src/pkg/crypto/rand/rand_test... src/pkg/crypto/rand/rand_test.go:41: t.Fatalf("Read(make(nil) = %d, %v", n, err) s/make(//