]> Cypherpunks repositories - gostls13.git/commit
bytes: add more page boundary tests
authorKeith Randall <keithr@alum.mit.edu>
Fri, 3 Nov 2017 17:30:14 +0000 (10:30 -0700)
committerKeith Randall <khr@golang.org>
Fri, 3 Nov 2017 18:51:51 +0000 (18:51 +0000)
commit3043c355f430bb304bc0d09d8162632baa028a83
tree8442fb1c4cad90ac8de5e1175087c5cb9989fc69
parentbb1fd3b5ff10eb9ad1a40b5bf7c7f35bd20e626f
bytes: add more page boundary tests

Make sure Index and IndexByte don't read past the queried byte slice.

Hopefully will be helpful for CL 33597.

Also remove the code which maps/unmaps the Go heap.
Much safer to play with protection bits off-heap.

Change-Id: I50d73e879b2d83285e1bc7c3e810efe4c245fe75
Reviewed-on: https://go-review.googlesource.com/75890
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/bytes/boundary_test.go [new file with mode: 0644]
src/bytes/equal_test.go [deleted file]