[gs-cvs] rev 9323 - trunk/gs/psi

till at ghostscript.com till at ghostscript.com
Sun Jan 4 12:20:48 PST 2009


Author: till
Date: 2009-01-04 12:20:47 -0800 (Sun, 04 Jan 2009)
New Revision: 9323

Modified:
   trunk/gs/psi/store.h
Log:
Fix sigbus/segfaults on sparc, hppa, etc.


Modified: trunk/gs/psi/store.h
===================================================================
--- trunk/gs/psi/store.h	2009-01-04 20:15:19 UTC (rev 9322)
+++ trunk/gs/psi/store.h	2009-01-04 20:20:47 UTC (rev 9323)
@@ -65,10 +65,14 @@
  * Assigning the components individually is fastest on Turbo C,
  * and on Watcom C when one or both of the addresses are
  * already known or in a register.
+ *
+ * Though, it sends wrong signals to the compiler that believes it's okay-ish
+ * to update the structure in two calls, and risks very wrong reordering. This
+ * _MUST_ be done in one call, and trust the compiler to do the proper thing,
+ * if not too bad. And we're using GCC anyways on Debian.
  */
 #define ref_assign_inline(pto,pfrom)\
-	((pto)->value = (pfrom)->value,\
-	 (pto)->tas = (pfrom)->tas)
+	(*(pto) = *(pfrom))
 #ifdef __TURBOC__
 	/*
 	 * Move the data in two 32-bit chunks, because



More information about the gs-cvs mailing list