This patch from Janne Snabb should fix PR 56320 about random failures on
Solaris x86_64.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

diff -r 29b742a2ed37 -r 3b1c3cceaf02 libgo/runtime/lfstack.c
--- a/libgo/runtime/lfstack.c	Fri Feb 15 10:54:51 2013 -0800
+++ b/libgo/runtime/lfstack.c	Wed Feb 20 11:41:05 2013 -0800
@@ -17,9 +17,10 @@
 #define PTR_MASK ((1ull<<PTR_BITS)-1)
 #define CNT_MASK (0ull-1)
 
-#if __SIZEOF_POINTER__ == 8 && defined(__sparc__)
-// SPARC64 uses all 64 bits of virtual addresses.  Use low-order three
-// bits as ABA counter.
+#if __SIZEOF_POINTER__ == 8 && (defined(__sparc__) || (defined(__sun__) && defined(__amd64__)))
+// SPARC64 and Solaris on AMD64 uses all 64 bits of virtual addresses.
+// Use low-order three bits as ABA counter.
+// http://docs.oracle.com/cd/E19120-01/open.solaris/816-5138/6mba6ua5p/index.html
 #undef PTR_BITS
 #undef CNT_MASK
 #undef PTR_MASK

Reply via email to