__memcpy_chk: Fix signed cmp of unsigned values.
I accidentally did a signed comparison of the size_t values passed in
for three of the _chk functions. Changing them to unsigned compares.
Add three new tests to verify this failure is fixed.
Bug: 10691831
Merge from internal master.
(cherry-picked from 883ef2499c2ff76605f73b1240f719ca6282e554)
Change-Id: Id9a96b549435f5d9b61dc132cf1082e0e30889f5
diff --git a/libc/arch-arm/krait/bionic/memcpy.S b/libc/arch-arm/krait/bionic/memcpy.S
index e433402..ea040bc 100644
--- a/libc/arch-arm/krait/bionic/memcpy.S
+++ b/libc/arch-arm/krait/bionic/memcpy.S
@@ -46,7 +46,7 @@
ENTRY(__memcpy_chk)
.cfi_startproc
cmp r2, r3
- bgt __memcpy_chk_fail
+ bhi __memcpy_chk_fail
// Fall through to memcpy...
.cfi_endproc