]> Cypherpunks repositories - gostls13.git/commit
internal/fuzz: fix TestUnmarshalMarshal on MIPS
authorRoland Shoemaker <roland@golang.org>
Sat, 5 Mar 2022 16:47:33 +0000 (08:47 -0800)
committerRoland Shoemaker <roland@golang.org>
Mon, 7 Mar 2022 15:02:48 +0000 (15:02 +0000)
commit63bd6f68e6cbb237b46a99775103758afaee370a
tree24df61cbb877e95218e9e405ebdd1c222ff3a588
parentd1820f748f8d63da8ef602e53d1db224f072be8f
internal/fuzz: fix TestUnmarshalMarshal on MIPS

Previous value used in the float32 roundtrip used float32(math.NaN())-1
which caused the quiet/signal bit to flip, which seemed to break the
test on MIPS platforms. Instead switch to using float32(math.NaN())+1,
which preserves the bit and makes the test happy.

Possibly related to #37455
Fixes #51258

Change-Id: Ia85c649e89a5d02027c0ec197f0ff318aa819c19
Reviewed-on: https://go-review.googlesource.com/c/go/+/390214
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/fuzz/encoding_test.go