From: Ian Lance Taylor Date: Mon, 13 Feb 2012 05:53:33 +0000 (-0800) Subject: sync/atomic: disable hammer pointer tests on wrong size system X-Git-Tag: weekly.2012-02-14~85 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c53b73455bdc2ca7ae6bc9f5e92984ba6682dc45;p=gostls13.git sync/atomic: disable hammer pointer tests on wrong size system hammerCompareAndSwapPointer64 was only passing on little-endian systems. hammerCompareAndSwapPointer32 was writing 8 bytes to a uint32 value on the heap. R=rsc, dvyukov CC=golang-dev https://golang.org/cl/5654065 --- diff --git a/src/pkg/sync/atomic/atomic_test.go b/src/pkg/sync/atomic/atomic_test.go index ad7557650f..a06c85c3a9 100644 --- a/src/pkg/sync/atomic/atomic_test.go +++ b/src/pkg/sync/atomic/atomic_test.go @@ -636,6 +636,7 @@ func init() { // 64-bit system; clear uintptr tests hammer32[2].f = nil hammer32[5].f = nil + hammer32[6].f = nil } } @@ -760,6 +761,7 @@ func init() { // 32-bit system; clear uintptr tests hammer64[2].f = nil hammer64[5].f = nil + hammer64[6].f = nil } }