diff options
| author | Bryan C. Mills <bcmills@google.com> | 2023-03-01 16:11:07 +0000 |
|---|---|---|
| committer | Bryan Mills <bcmills@google.com> | 2023-03-02 16:34:21 +0000 |
| commit | 3f8f929d60a90c4e4e2b07c8d1972166c1a783b1 (patch) | |
| tree | 99ab6774006a5bf4d2bf07dce3bb3a7c1a2cad87 /src/runtime | |
| parent | b958d4a597a599e22c78d25d83d803ab2a1f2c52 (diff) | |
| download | go-3f8f929d60a90c4e4e2b07c8d1972166c1a783b1.tar.xz | |
cmd/link/internal/ld: move more of mustLinkExternal into internal/platform
internal/platform.MustLinkExternal is used in various places to
determine whether external linking is required. It should always
match what the linker actually requires, but today does not match
because the linker imposes additional constraints.
Updates #31544.
Change-Id: I0cc6ad587e95c607329dea5d60d29a5fb2a9e722
Reviewed-on: https://go-review.googlesource.com/c/go/+/472515
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/crash_test.go | 14 | ||||
| -rw-r--r-- | src/runtime/time_test.go | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index a2f0926599..3a64c30e2b 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -184,7 +184,7 @@ func TestCrashHandler(t *testing.T) { func testDeadlock(t *testing.T, name string) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) output := runTestProg(t, "testprog", name) want := "fatal error: all goroutines are asleep - deadlock!\n" @@ -211,7 +211,7 @@ func TestLockedDeadlock2(t *testing.T) { func TestGoexitDeadlock(t *testing.T) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) output := runTestProg(t, "testprog", "GoexitDeadlock") want := "no goroutines (main called runtime.Goexit) - deadlock!" @@ -311,7 +311,7 @@ panic: third panic func TestGoexitCrash(t *testing.T) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) output := runTestProg(t, "testprog", "GoexitExit") want := "no goroutines (main called runtime.Goexit) - deadlock!" @@ -372,7 +372,7 @@ func TestBreakpoint(t *testing.T) { func TestGoexitInPanic(t *testing.T) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) // see issue 8774: this code used to trigger an infinite recursion output := runTestProg(t, "testprog", "GoexitInPanic") @@ -439,7 +439,7 @@ func TestPanicAfterGoexit(t *testing.T) { func TestRecoveredPanicAfterGoexit(t *testing.T) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) output := runTestProg(t, "testprog", "RecoveredPanicAfterGoexit") want := "fatal error: no goroutines (main called runtime.Goexit) - deadlock!" @@ -450,7 +450,7 @@ func TestRecoveredPanicAfterGoexit(t *testing.T) { func TestRecoverBeforePanicAfterGoexit(t *testing.T) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) t.Parallel() output := runTestProg(t, "testprog", "RecoverBeforePanicAfterGoexit") @@ -462,7 +462,7 @@ func TestRecoverBeforePanicAfterGoexit(t *testing.T) { func TestRecoverBeforePanicAfterGoexit2(t *testing.T) { // External linking brings in cgo, causing deadlock detection not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) t.Parallel() output := runTestProg(t, "testprog", "RecoverBeforePanicAfterGoexit2") diff --git a/src/runtime/time_test.go b/src/runtime/time_test.go index afd9af2af4..f08682055b 100644 --- a/src/runtime/time_test.go +++ b/src/runtime/time_test.go @@ -22,7 +22,7 @@ func TestFakeTime(t *testing.T) { // Faketime is advanced in checkdead. External linking brings in cgo, // causing checkdead not working. - testenv.MustInternalLink(t) + testenv.MustInternalLink(t, false) t.Parallel() |
