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

Comments

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 10, 2018

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

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Oct 10, 2018

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 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

@gopherbot gopherbot commented Oct 10, 2018

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

@gopherbot gopherbot closed this in e19f575 Oct 12, 2018
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 13, 2018

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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.