Source file src/runtime/testdata/testprogcgo/threadpanic.go
1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !plan9 6 // +build !plan9 7 8 package main 9 10 // void start(void); 11 import "C" 12 13 func init() { 14 register("CgoExternalThreadPanic", CgoExternalThreadPanic) 15 } 16 17 func CgoExternalThreadPanic() { 18 C.start() 19 select {} 20 } 21 22 //export gopanic 23 func gopanic() { 24 panic("BOOM") 25 } 26