[pull] master from golang:master#100
Merged
Merged
Conversation
…bnormal When fadd64/fsub64 cancel two near-equal, opposite-sign normal operands into a subnormal result, fpack64 is handed a mantissa far below 1<<mantbits64 while exp is still a normal-range exponent. fpack64 saved mant0/exp0/trunc0 before its normalization loop, so the denormal branch restored an un-normalized mantissa and right-shifted it to align to the subnormal exponent (the wrong direction here), returning the un-normalized cancellation mantissa at the wrong scale instead of the correctly rounded subnormal. Save mant0/exp0/trunc0 after the normalization loop so the denormal path restores a normalized mantissa and aligns correctly. This is a no-op for callers that already pass a normalized mantissa (fmul64, fdiv64, conversions). fpack32 is updated identically for parity, though its denormal branch is not reachable with an un-normalized mantissa through any current caller. This only manifests on softfloat targets (e.g. GOMIPS=softfloat), which is why it has gone unnoticed on hardware-float platforms. A randomized differential check against hardware found the previous code wrong on >50% of normal pairs that cancel into a subnormal; with this change those cases match hardware. Fixes #79964 Change-Id: I29f7ec79905ddb98af4f997a69b0a2f0574c3c9d GitHub-Last-Rev: 42a73cd GitHub-Pull-Request: #79965 Reviewed-on: https://go-review.googlesource.com/c/go/+/789861 Reviewed-by: Sayer Turner <sayerturner65@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TestCtrlBreak relied on a fixed sleep to wait for a testing child program to be ready to receive the signal. This may cause flaky timeouts on slow machines. Instead, wait for the child to print a "ready" message like other signal tests, particularly runtime.TestLibraryCtrlHandler. Also fix a typo in the child program's file name to ensure it's easy to associate with the test. Fixes #80036 Change-Id: Ib3d8e6194538df95e76548771b401cf9b9de5674 Reviewed-on: https://go-review.googlesource.com/c/go/+/792020 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Hongxiang Jiang <hxjiang@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )