The previous test would fail to crash if the first byte of the canary was
already NUL (1 of 256 runs assuming uniform canary distribution).
Bug: http://b/121156651
Test: bionic unit tests
The compiler in master doesn't leave a gap between the buffer and the stack
guard canary.
Bug: http://b/27815668
Change-Id: Iae6681683881055c2719d661a2179f5305c23135
Built for fugu this was working fine, but built for generic x86/x86-64
the compiler was (a) optimizing out all the stack writes and (b) inserting
enough padding on x86-64 for the canary to be safely out of the way.
While here, let's tighten up this test so we test that it's sufficient to
only overwrite the buffer by one byte...
(cherry-pick of 6f90c1ac59eb4e7811b7b0e408615049c935c0a9.)
Bug: http://b/27815668
Change-Id: I80a646de4b30fd5c78df20fdaa7e3eb163585caf