-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Weird panic in garble test
#522
Milestone
Comments
Could you please share full repro steps, e.g. including |
Sure!
The |
Thanks, I can reproduce. |
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Apr 22, 2022
The added test case reproduces the failure if we uncomment the added "continue" line in processImportCfg: # test/bar/exporttest [test/bar/exporttest.test] panic: refusing to list non-dependency package: test/bar/exporttest goroutine 1 [running]: mvdan.cc/garble.processImportCfg({0xc000166780?, 0xc0001f4a70?, 0x2?}) /home/mvdan/src/garble/main.go:983 +0x58b mvdan.cc/garble.transformCompile({0xc000124020?, 0x11?, 0x12?}) /home/mvdan/src/garble/main.go:736 +0x338 It seems like a quirk of cmd/go that it includes a redundant packagefile line in this particular edge case, but it's generally harmless for "go build". For "garble build" it's also harmless in principle, but in practice we had sanity checks that got upset by the unexpected line. For now, notice the edge case and ignore it. Fixes burrowers#522.
Can you confirm that the fix above works for you? |
lu4p
pushed a commit
that referenced
this issue
Apr 22, 2022
The added test case reproduces the failure if we uncomment the added "continue" line in processImportCfg: # test/bar/exporttest [test/bar/exporttest.test] panic: refusing to list non-dependency package: test/bar/exporttest goroutine 1 [running]: mvdan.cc/garble.processImportCfg({0xc000166780?, 0xc0001f4a70?, 0x2?}) /home/mvdan/src/garble/main.go:983 +0x58b mvdan.cc/garble.transformCompile({0xc000124020?, 0x11?, 0x12?}) /home/mvdan/src/garble/main.go:736 +0x338 It seems like a quirk of cmd/go that it includes a redundant packagefile line in this particular edge case, but it's generally harmless for "go build". For "garble build" it's also harmless in principle, but in practice we had sanity checks that got upset by the unexpected line. For now, notice the edge case and ignore it. Fixes #522.
0x1a8510f2
added a commit
to wraith-labs/wraith
that referenced
this issue
Apr 23, 2022
@mvdan Can indeed confirm: https://ci.0x1a8510f2.space/0x1a8510f2/wraith/112/1/2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
While attempting to test a package with
garble test
, garble panics whilego test
succeeds. Please see build logs below (note: the environment is different to that detailed above but the result is the same):Package test log (successful) with regular Go command: https://ci.0x1a8510f2.space/0x1a8510f2/wraith/111/1/2
Package test log (failed) with garble command: https://ci.0x1a8510f2.space/0x1a8510f2/wraith/110/1/2
File causing issues: https://git.0x1a8510f2.space/0x1a8510f2/wraith/src/branch/indev/wraith/libwraith/Shm_test.go
Relevant garble code:
garble/shared.go
Lines 386 to 391 in 1a0b028
What did you expect to see?
Successful test as with Go command
What did you see instead?
The text was updated successfully, but these errors were encountered: