1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:05:00 -07:00

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
This commit is contained in:
Ian Lance Taylor 2012-02-12 21:53:33 -08:00
parent b440a65033
commit c53b73455b

View File

@ -636,6 +636,7 @@ func init() {
// 64-bit system; clear uintptr tests // 64-bit system; clear uintptr tests
hammer32[2].f = nil hammer32[2].f = nil
hammer32[5].f = nil hammer32[5].f = nil
hammer32[6].f = nil
} }
} }
@ -760,6 +761,7 @@ func init() {
// 32-bit system; clear uintptr tests // 32-bit system; clear uintptr tests
hammer64[2].f = nil hammer64[2].f = nil
hammer64[5].f = nil hammer64[5].f = nil
hammer64[6].f = nil
} }
} }