]> Cypherpunks repositories - gostls13.git/commitdiff
sync/atomic: disable hammer pointer tests on wrong size system
authorIan Lance Taylor <iant@golang.org>
Mon, 13 Feb 2012 05:53:33 +0000 (21:53 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 13 Feb 2012 05:53:33 +0000 (21:53 -0800)
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

src/pkg/sync/atomic/atomic_test.go

index ad7557650f60895d95a2a7b79de6392e762cf18f..a06c85c3a9e5924a6b2f5ecf412affdc74f41feb 100644 (file)
@@ -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
        }
 }