1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:36:10 -07:00
go/test/fixedbugs/issue11656.go
Paul E. Murphy c7fa66179b test: workaround SIGILL on issue11656 on aix
For some reason, aix sometimes executes the bogus function body. This
should never happen as it lives in a no-execute section. It might be
a transient permission blip as the heap grows.

Add a small function to cleanup and synchronize the icache before
jumping to the bogus function to ensure it causes a panic, not SIGILL.

Fixes #44583

Change-Id: Iadca62d82bfb70fc62088705dac42a880a1208fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/377314
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-01-11 15:28:40 +00:00

23 lines
732 B
Go

// runindir
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 11656: runtime: jump to bad PC missing good traceback
// windows doesn't work, because Windows exception handling
// delivers signals based on the current PC, and that current PC
// doesn't go into the Go runtime.
// wasm does not work, because the linear memory is not executable.
// This test doesn't work on gccgo/GoLLVM, because they will not find
// any unwind information for the artificial function, and will not be
// able to unwind past that point.
//go:build !windows && !wasm && !gccgo
// +build !windows,!wasm,!gccgo
package ignored