]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.13] math/big: make Rat accessors safe for concurrent use
authorRobert Griesemer <gri@golang.org>
Tue, 15 Oct 2019 20:44:22 +0000 (13:44 -0700)
committerDmitri Shuralyov <dmitshur@golang.org>
Wed, 27 May 2020 22:52:06 +0000 (22:52 +0000)
commit444ad952c4dd346955362165aa20d0b4938ffcca
treee0293d2eee9d6a650f120f97f5f30113dff5e1d9
parent1a1178122f31bfe67534ec637883636755adbfbc
[release-branch.go1.13] math/big: make Rat accessors safe for concurrent use

Do not modify the underlying Rat denominator when calling
one of the accessors Float32, Float64; verify that we don't
modify the Rat denominator when calling Inv, Sign, IsInt, Num.

For #36689.
For #34919.
For #33792.

Change-Id: Ife6d1252373f493a597398ee51e7b5695b708df5
Reviewed-on: https://go-review.googlesource.com/c/go/+/201205
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/233321
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/math/big/rat.go
src/math/big/rat_test.go