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

syscall: x/tools broken on FreeBSD by FreeBSD 12 support CL #28131

Closed
dmitshur opened this issue Oct 10, 2018 · 4 comments
Closed

syscall: x/tools broken on FreeBSD by FreeBSD 12 support CL #28131

dmitshur opened this issue Oct 10, 2018 · 4 comments
Labels
FrozenDueToAge OS-FreeBSD Testing An issue that has been verified to require only test changes, not just a test failure.

Comments

@dmitshur
Copy link
Contributor

The x/tools subrepo seems to be broken after CL 138595. /cc @paulzhol

2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/cmd/compile/internal/ssa/testdata : no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/msan	: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/math/randamd6�E�: no such file or directory
--- FAIL: TestFindImportInternal (0.00s)
    fix_test.go:1443: findImportGoPath("race", Acquire ...) = "", false; want "internal/race", false
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/testdata.go: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/testdata.go: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/msan	: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/internaldefs3_liCH�: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/math/randamd6�E�: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/cmd/compile/internal/ssa/testdata : no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/testdata.go: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/cmd/compile/internal/ssa/testdata : no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/testdata.go: no such file or directory
2018/10/10 14:30:05 goimports: scanning directory /tmp/workdir/go/src: open /tmp/workdir/go/src/runtime/internaldefs3_liCH�: no such file or directory
FAIL
FAIL	golang.org/x/tools/imports	0.468s

See https://build.golang.org/?repo=golang.org%2fx%2ftools#short and https://go-review.googlesource.com/c/go/+/138595#message-71a4da926fb9669d319aa4b34fd9d548de32dc23.

/cc @bradfitz @bcmills @heschik

@dmitshur dmitshur added OS-FreeBSD Testing An issue that has been verified to require only test changes, not just a test failure. labels Oct 10, 2018
@bradfitz
Copy link
Contributor

Looks like the null termination is broken when converting the FreeBSD 12 structs to the FreeBSD 11 structs.

I guess we're lacking test coverage of some system call(s) in std.

@paulzhol
Copy link
Member

paulzhol commented Oct 10, 2018

convertFromDirents11 seems to be broken but only occasionally. I'm investigating
Unsurprisingly that test works on FreeBSD 12.

@gopherbot
Copy link

Change https://golang.org/cl/141297 mentions this issue: syscall: fix FreeBSD convertFromDirents11

@gopherbot
Copy link

Change https://golang.org/cl/141801 mentions this issue: internal/fastwalk: don't cross Dirent.Reclen boundry while looking for NULL in parseDirEnt

gopherbot pushed a commit to golang/tools that referenced this issue Oct 13, 2018
…r NULL in parseDirEnt

Crossing Dirent.Reclen boundry was manifested in golang/go#28131 as garbaled filenames,
when Dirent.Name was not NULL terminated on FreeBSD due to a bug (parseDirEnt would find a NULL
in the following Dirent's Fileno/Reclen fields).

Only search for NULL on linux, when the Namlen field is available use it directly instead.

Updates golang/go#28131

Change-Id: I64090576c8bad2bd246d1561432bf73d5caee2a9
Reviewed-on: https://go-review.googlesource.com/c/141801
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Oct 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge OS-FreeBSD Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants