Skip to content

cmd/compile: plan9/amd64 programs crash since CL 801860 #80709

Closed

Description

@0intro

CL 548317 changed the epilogue of Go functions on AMD64 to restore SP from BP with the LEAVE instruction. It was reverted in CL 801740, then relanded in CL 801860.

However, on Plan 9, BP holds the system call number, and the system call stubs are frameless, so neither the assembler nor the kernel restores it. A function making a system call now returns with a system call number in SP, and jumps to an arbitrary address.

Since then, no plan9/amd64 program built by the toolchain runs. Running make.rc stops as soon as the new compiler has produced one:

Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go_bootstrap 3276: suicide: sys: trap: fault read addr=0x17 pc=0x17

The crash happens before the note handler is installed, so the kernel reports it rather than the Go runtime. The gotip-plan9-amd64 builder has produced no result since 22 July.

plan9/386 is not affected, since the 386 port has no frame pointer.

@golang/plan9

Activity

  1. self-assigned this
    on Aug 4, 2026
  2. 0intro commented on Aug 4, 2026

    @0intro
    MemberAuthor

    Will be fixed by #80710.

  3. gopherbot commented on Aug 4, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/809960 mentions this issue: cmd/internal/obj/x86: fix breaking change in ABI0 NOFRAME BP expectations

  4. added a commit that references this issue on Aug 4, 2026
    4c06723
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OS-Plan9compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions