mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: allow crash from gsignal stack
The uses of onM in dopanic/startpanic are okay even from the signal stack. Fixes #8666. LGTM=khr R=khr CC=golang-codereviews https://golang.org/cl/134710043
This commit is contained in:
parent
f956740163
commit
1d550b87db
9 changed files with 104 additions and 2 deletions
|
|
@ -175,6 +175,14 @@ func TestMainGoroutineId(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestBreakpoint(t *testing.T) {
|
||||
output := executeTest(t, breakpointSource, nil)
|
||||
want := "runtime.Breakpoint()"
|
||||
if !strings.Contains(output, want) {
|
||||
t.Fatalf("output:\n%s\n\nwant output containing: %s", output, want)
|
||||
}
|
||||
}
|
||||
|
||||
const crashSource = `
|
||||
package main
|
||||
|
||||
|
|
@ -380,3 +388,11 @@ func main() {
|
|||
panic("test")
|
||||
}
|
||||
`
|
||||
|
||||
const breakpointSource = `
|
||||
package main
|
||||
import "runtime"
|
||||
func main() {
|
||||
runtime.Breakpoint()
|
||||
}
|
||||
`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue