Преглед на файлове

fix child stack alignment on mips clone

unlike other archs, the mips version of clone was not doing anything
to align the stack pointer. this seems to have been the cause for some
SIGBUS crashes that were observed in posix_spawn.
Rich Felker преди 11 години
родител
ревизия
bfba15c9b9
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      src/thread/mips/clone.s

+ 1 - 0
src/thread/mips/clone.s

@@ -3,6 +3,7 @@
 .type   __clone,@function
 __clone:
 	# Save function pointer and argument pointer on new thread stack
+	and $5, $5, -8
 	subu $5, $5, 16
 	sw $4, 0($5)
 	sw $7, 4($5)