Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Oct 2016 02:23:29 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307598 - head/sys/powerpc/fpu
Message-ID:  <201610190223.u9J2NTiS005010@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Wed Oct 19 02:23:29 2016
New Revision: 307598
URL: https://svnweb.freebsd.org/changeset/base/307598

Log:
  Un-static two local variables in the FPU emulator
  
  Static variables aren't MP-safe, and this was causing bizarre segfaults on a
  dual-core e500v2 system (P1022).
  
  Still left is one static variable, which should be moved into the pcb instead,
  but as illegal instructions haven't been hit yet, it's lower priority.
  
  MFC after:	1 week

Modified:
  head/sys/powerpc/fpu/fpu_emu.c

Modified: head/sys/powerpc/fpu/fpu_emu.c
==============================================================================
--- head/sys/powerpc/fpu/fpu_emu.c	Wed Oct 19 02:20:48 2016	(r307597)
+++ head/sys/powerpc/fpu/fpu_emu.c	Wed Oct 19 02:23:29 2016	(r307598)
@@ -185,8 +185,8 @@ fpu_dumpfpn(struct fpn *fp)
 int
 fpu_emulate(struct trapframe *frame, struct fpu *fpf)
 {
-	static union instr insn;
-	static struct fpemu fe;
+	union instr insn;
+	struct fpemu fe;
 	static int lastill = 0;
 	int sig;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610190223.u9J2NTiS005010>