Skip to content

cmd/compile: GOEXPERIMENT=clobberdead is broken #27326

Closed

Description

@cherrymui

What version of Go are you using (go version)?

tip (618bfb2)

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

darwin/amd64

What did you do?

$ GOEXPERIMENT=clobberdead ./all.bash 
Building Go cmd/dist using /Users/cherryyz/src/go1.8.
Building Go toolchain1 using /Users/cherryyz/src/go1.8.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go tool dist: FAILED: /Users/cherryyz/src/go-tip/pkg/tool/darwin_amd64/go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2

Not sure if it catches a real bug, or the experiment itself is broken. I may take a look tomorrow.

Activity

  1. added this to the Go1.12 milestone on Aug 29, 2018
  2. gopherbot commented on Aug 29, 2018

    @gopherbot
    Contributor

    Change https://golang.org/cl/131956 mentions this issue: cmd/compile: only clobber dead slots at call sites

  3. gopherbot commented on Aug 29, 2018

    @gopherbot
    Contributor

    Change https://golang.org/cl/131957 mentions this issue: cmd/compile: don't clobber dead slots in runtime.wbBufFlush

  4. cherrymui commented on Aug 29, 2018

    @cherrymui
    MemberAuthor

    The main thing is that we now have many more safepoints, at nearly all instructions. Clobbering at all these safepoints currently doesn't work. Maybe the stack maps at non-call safepoints are still imprecise, or some other reason. I haven't investigated. CL 131956 disables non-call safepoints for clobbering.

    With the two CLs above, I got it mostly working on Linux AMD64. There are a few tests failing, that are incompatible with the experiment, for example, explicitly testing register maps. And when bootstrapping cmd/go complains about some packages are stall, which I have no idea how to debug, so I just skipped the check (by setting a VERSION). Besides those, it works fine.

    On Darwin AMD64, it still doesn't work. Still looking.

  5. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Aug 30, 2018
  6. randall77 commented on Oct 30, 2018

    @randall77
    Contributor

    Now that we have stack objects, there's the additional complication that we can't clobber stack objects (all address-taken local variables) because plive doesn't know for sure that they are dead anymore.

    clobberdead was originally intended to test all the weird ambiguously live logic. Maybe now that all that logic is gone, we can retire this mode.

  7. gopherbot commented on Nov 26, 2018

    @gopherbot
    Contributor

    Change https://golang.org/cl/151317 mentions this issue: cmd/compile: remove CLOBBERDEAD experiment

  8. locked and limited conversation to collaborators on Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions