From db7f521db7f50251ebfc2ff9b4fa4a9e6f8e87d7 Mon Sep 17 00:00:00 2001 From: Brandon Bergren Date: Wed, 11 Mar 2020 23:34:44 +0000 Subject: [PATCH] Fix r358688 -- Remember to actually save r3 before processing. Crash was noticed by pkubaj building gcc9. Apparently non dword-aligned char pointers are somewhat rare in the wild. Reported by: pkubaj Sponsored by: Tag1 Consulting, Inc. --- lib/libc/powerpc64/string/memcpy.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/powerpc64/string/memcpy.S b/lib/libc/powerpc64/string/memcpy.S index 3e6649711382..0163ea1be2cd 100644 --- a/lib/libc/powerpc64/string/memcpy.S +++ b/lib/libc/powerpc64/string/memcpy.S @@ -58,8 +58,8 @@ ENTRY(FN_NAME) andi. %r7, %r4, ALIGN_MASK cmpd %r8, %r7 mr %r7, %r5 - bne .Lcopy_remaining_fix_index_byte mr %r8, %r3 /* save dst */ + bne .Lcopy_remaining_fix_index_byte /* align src */ .Lalignment_loop: