From d15ac668f082cc45fc9e74bc9e2a013eea0f1a80 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Tue, 24 Jan 2017 18:56:09 +0000 Subject: [PATCH] Fix the error value we write in cerror. __error returns an int *, however we were writing a 64 bit value meaning the 32 bits after this would be trashed. MFC after: 3 days Sponsored by: DARPA, AFRL --- lib/libc/aarch64/sys/cerror.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/aarch64/sys/cerror.S b/lib/libc/aarch64/sys/cerror.S index 9d87275e824..7e1627dc8ab 100644 --- a/lib/libc/aarch64/sys/cerror.S +++ b/lib/libc/aarch64/sys/cerror.S @@ -34,7 +34,7 @@ ENTRY(cerror) stp x0, lr, [sp] bl _C_LABEL(__error) ldp x1, lr, [sp] - str x1, [x0] + str w1, [x0] movn x0, #0 movn x1, #0 add sp, sp, #16