[release-branch.go1.14] all: merge master into release-branch.go1.14
a864cc7560 doc: rename HTML element IDs to avoid duplicates
fb93cd45a6 net: don't check LookupHost error in TestLookupNullByte
f770366f6d runtime: don't treat SIGURG as a bad signal
e3f2e9ac4e internal/bytealg: fix riscv64 offset names
Change-Id: I2ef0665dce7f1ade9b6c826cfd5c8eab041ff23f
diff --git a/doc/go1.11.html b/doc/go1.11.html
index 841ead2..483ecd8 100644
--- a/doc/go1.11.html
+++ b/doc/go1.11.html
@@ -826,7 +826,7 @@
<!-- CL 101715 was reverted -->
-<dl id="runtime-again"><dt><a href="/pkg/runtime/">runtime</a></dt>
+<dl id="pkg-runtime"><dt id="runtime-again"><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p><!-- CL 70993 -->
diff --git a/doc/go1.13.html b/doc/go1.13.html
index a17337f..8f4035d 100644
--- a/doc/go1.13.html
+++ b/doc/go1.13.html
@@ -904,7 +904,7 @@
</dl><!-- reflect -->
-<dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p> <!-- CL 167780 -->
Tracebacks, <a href="/pkg/runtime/#Caller"><code>runtime.Caller</code></a>,
diff --git a/doc/go1.14.html b/doc/go1.14.html
index 186899e..7cf73bc 100644
--- a/doc/go1.14.html
+++ b/doc/go1.14.html
@@ -736,7 +736,7 @@
</dl><!-- reflect -->
-<dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p><!-- CL 200081 -->
<code>runtime.Goexit</code> can no longer be aborted by a
diff --git a/doc/go1.9.html b/doc/go1.9.html
index 3dfdf53..86ee257 100644
--- a/doc/go1.9.html
+++ b/doc/go1.9.html
@@ -862,7 +862,7 @@
</dl><!-- reflect -->
-<dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
+<dl id="pkg-runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p><!-- CL 37233, CL 37726 -->
Tracebacks generated by the runtime and recorded in profiles are
diff --git a/src/internal/bytealg/indexbyte_riscv64.s b/src/internal/bytealg/indexbyte_riscv64.s
index 087be86..156c303 100644
--- a/src/internal/bytealg/indexbyte_riscv64.s
+++ b/src/internal/bytealg/indexbyte_riscv64.s
@@ -6,8 +6,8 @@
#include "textflag.h"
TEXT ·IndexByte(SB),NOSPLIT,$0-40
- MOV s+0(FP), A1
- MOV s_len+8(FP), A2
+ MOV b_base+0(FP), A1
+ MOV b_len+8(FP), A2
MOVBU c+24(FP), A3 // byte to find
MOV A1, A4 // store base for later
ADD A1, A2 // end
@@ -29,8 +29,8 @@
RET
TEXT ·IndexByteString(SB),NOSPLIT,$0-32
- MOV p+0(FP), A1
- MOV b_len+8(FP), A2
+ MOV s_base+0(FP), A1
+ MOV s_len+8(FP), A2
MOVBU c+16(FP), A3 // byte to find
MOV A1, A4 // store base for later
ADD A1, A2 // end
diff --git a/src/net/lookup_test.go b/src/net/lookup_test.go
index 1663b78..2bc5592 100644
--- a/src/net/lookup_test.go
+++ b/src/net/lookup_test.go
@@ -1179,12 +1179,9 @@
}
}
-// Issue 31586: don't crash on null byte in name
+// Issue 31597: don't panic on null byte in name
func TestLookupNullByte(t *testing.T) {
testenv.MustHaveExternalNetwork(t)
testenv.SkipFlakyNet(t)
- _, err := LookupHost("foo\x00bar") // used to crash on Windows
- if err == nil {
- t.Errorf("unexpected success")
- }
+ LookupHost("foo\x00bar") // check that it doesn't panic; it used to on Windows
}
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go
index 3861cac..d2e6693 100644
--- a/src/runtime/signal_unix.go
+++ b/src/runtime/signal_unix.go
@@ -412,6 +412,16 @@
sigprofNonGoPC(c.sigpc())
return
}
+ if sig == sigPreempt && preemptMSupported && debug.asyncpreemptoff == 0 {
+ // This is probably a signal from preemptM sent
+ // while executing Go code but received while
+ // executing non-Go code.
+ // We got past sigfwdgo, so we know that there is
+ // no non-Go signal handler for sigPreempt.
+ // The default behavior for sigPreempt is to ignore
+ // the signal, so badsignal will be a no-op anyway.
+ return
+ }
c.fixsigcode(sig)
badsignal(uintptr(sig), c)
return