Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: build broken on plan9/amd64 since CL 20218 #14680

Closed
0intro opened this issue Mar 7, 2016 · 4 comments
Closed

cmd/compile: build broken on plan9/amd64 since CL 20218 #14680

0intro opened this issue Mar 7, 2016 · 4 comments

Comments

@0intro
Copy link
Member

0intro commented Mar 7, 2016

Since CL 20218 (commit 12e6045), the build is broken on plan9/amd64.

##### Building packages and commands for plan9/amd64.
runtime/internal/sys
runtime/internal/atomic
# runtime/internal/atomic
copying $WORK/runtime/internal/atomic/_obj/asm.o to $WORK/runtime/internal/atomic.a: unexpected EOF
Build complete, duration 39.563935472s. Result: error: exit status: 'all.rc 2095984: go_bootstrap 2096584: 2'

See http://build.golang.org/log/cfa10e4201d95fab6584b7b0c3c1dca9c52ed6db

Detail of the commands:

% /tmp/go/pkg/tool/plan9_amd64/go_bootstrap install -v -x std cmd
WORK=/tmp/go-build227855670
runtime/internal/sys
mkdir -p $WORK/runtime/internal/sys/_obj/
mkdir -p $WORK/runtime/internal/
cd /tmp/go/src/runtime/internal/sys
/tmp/go/pkg/tool/plan9_amd64/compile -o $WORK/runtime/internal/sys.a -trimpath $WORK -p runtime/internal/sys -+ -complete -buildid 5225080417a06633070d2dd56d9af4f6b2c943bf -D _/tmp/go/src/runtime/internal/sys -I $WORK -pack ./arch_amd64.go ./stubs.go ./sys.go ./zgoarch_amd64.go ./zgoos_plan9.go ./zversion.go
mkdir -p /tmp/go/pkg/plan9_amd64/runtime/internal/
cp $WORK/runtime/internal/sys.a /tmp/go/pkg/plan9_amd64/runtime/internal/sys.a
runtime/internal/atomic
mkdir -p $WORK/runtime/internal/atomic/_obj/
cd /tmp/go/src/runtime/internal/atomic
/tmp/go/pkg/tool/plan9_amd64/compile -o $WORK/runtime/internal/atomic.a -trimpath $WORK -p runtime/internal/atomic -+ -buildid ab25b096a9fc67eb5afc88ac8a40f4ff336a5964 -D _/tmp/go/src/runtime/internal/atomic -I $WORK -pack -asmhdr $WORK/runtime/internal/atomic/_obj/go_asm.h ./atomic_amd64x.go ./stubs.go
/tmp/go/pkg/tool/plan9_amd64/asm -o $WORK/runtime/internal/atomic/_obj/asm.o -trimpath $WORK -I $WORK/runtime/internal/atomic/_obj/ -I /tmp/go/pkg/include -D GOOS_plan9 -D GOARCH_amd64 ./asm.s
/tmp/go/pkg/tool/plan9_amd64/asm -o $WORK/runtime/internal/atomic/_obj/asm_amd64.o -trimpath $WORK -I $WORK/runtime/internal/atomic/_obj/ -I /tmp/go/pkg/include -D GOOS_plan9 -D GOARCH_amd64 ./asm_amd64.s
pack r $WORK/runtime/internal/atomic.a $WORK/runtime/internal/atomic/_obj/asm.o $WORK/runtime/internal/atomic/_obj/asm_amd64.o # internal
# runtime/internal/atomic
copying $WORK/runtime/internal/atomic/_obj/asm.o to $WORK/runtime/internal/atomic.a: unexpected EOF

Disabling the MOVLload rule works around the issue.

What is happening?

@0intro 0intro added the OS-Plan9 label Mar 7, 2016
@0intro 0intro self-assigned this Mar 7, 2016
@0intro 0intro added this to the Go1.7 milestone Mar 7, 2016
@0intro
Copy link
Member Author

0intro commented Mar 7, 2016

CC @4ad

@0intro
Copy link
Member Author

0intro commented Mar 7, 2016

The error "unexpected EOF" is returned by packInternal in cmd/go, because n < size, where n=200 and size=858993459400. The variable size contains the incorrect value returned by fi.Size().

I've compared the assembly code of go_bootstrap with and without the MOVLload combination rule.
Here are the differences for the syscall.UnmarshalDir (called by File.Stat via dirstat) function:

https://www.diffchecker.com/6yno7vie (without addresses)
https://www.diffchecker.com/cmnxgijm (with addresses)

CC @randall77

@randall77
Copy link
Contributor

Does https://go-review.googlesource.com/20333 fix this for you?

@0intro
Copy link
Member Author

0intro commented Mar 8, 2016

The CL 20333 does indeed fix the issue in syscall.UnmarshalDir.

Thanks.

@0intro 0intro closed this as completed Mar 8, 2016
@golang golang locked and limited conversation to collaborators Mar 13, 2017
@rsc rsc unassigned 0intro Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants