1// Copyright 2018 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 5package main 6 7// This program will crash. 8// We want to test unwinding from sigpanic into C code (without a C symbolizer). 9 10/* 11#cgo CFLAGS: -O0 12 13char *pnil; 14 15static int f1(void) { 16 *pnil = 0; 17 return 0; 18} 19*/ 20import "C" 21 22func init() { 23 register("TracebackSigpanic", TracebackSigpanic) 24} 25 26func TracebackSigpanic() { 27 C.f1() 28} 29