svn commit: r358902 - head/lib/libc/powerpc64/string

Brandon Bergren bdragon at FreeBSD.org
Wed Mar 11 23:34:45 UTC 2020


Author: bdragon
Date: Wed Mar 11 23:34:44 2020
New Revision: 358902
URL: https://svnweb.freebsd.org/changeset/base/358902

Log:
  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.

Modified:
  head/lib/libc/powerpc64/string/memcpy.S

Modified: head/lib/libc/powerpc64/string/memcpy.S
==============================================================================
--- head/lib/libc/powerpc64/string/memcpy.S	Wed Mar 11 22:25:45 2020	(r358901)
+++ head/lib/libc/powerpc64/string/memcpy.S	Wed Mar 11 23:34:44 2020	(r358902)
@@ -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:


More information about the svn-src-all mailing list