-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
math/big: don't force second arg to Jacobi and Int.ModSqrt to escape #50527
Conversation
This CL updates big.Jacobi to avoid forcing its y argument to escape to the heap. The argument was escaping because it was being passed through an empty interface to fmt.Sprintf during an assertion failure. As a result, callers of Jacobi and Int.ModSqrt (which calls Jacobi) could not keep this value on the stack. Noticed when working on cockroachdb/apd#103.
This PR (HEAD: 3ee07b5) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/377014 to see it. Tip: You can toggle comments from me using the |
Message from Robert Griesemer: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Robert Griesemer: Patch Set 1: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Robert Griesemer: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Filippo Valsorda: Patch Set 1: Code-Review+2 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Ian Lance Taylor: Patch Set 2: Patch Set 1 was rebased Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Ian Lance Taylor: Patch Set 2: Run-TryBot+1 Auto-Submit+1 Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/377014. |
This CL updates big.Jacobi to avoid forcing its y argument to escape to the heap. The argument was escaping because it was being passed through an empty interface to fmt.Sprintf during an assertion failure. As a result, callers of Jacobi and Int.ModSqrt (which calls Jacobi) could not keep this value on the stack. Noticed when working on cockroachdb/apd#103. Change-Id: I5db9ee2149bf13b921886929425861721b53b085 GitHub-Last-Rev: 3ee07b5 GitHub-Pull-Request: #50527 Reviewed-on: https://go-review.googlesource.com/c/go/+/377014 Auto-Submit: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]>
This PR is being closed because golang.org/cl/377014 has been merged. |
This CL updates big.Jacobi to avoid forcing its y argument to escape
to the heap. The argument was escaping because it was being passed
through an empty interface to fmt.Sprintf during an assertion failure.
As a result, callers of Jacobi and Int.ModSqrt (which calls Jacobi)
could not keep this value on the stack.
Noticed when working on cockroachdb/apd#103.