You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./mkdirall_test.go:16:16: internal compiler error: order.stmt CALLMETH
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
Versions
This works without error on golang 1.17.13.
It fails for me on go 1.18.8 and go 1.19.3.
I have tried on an older afero 1.2.2 as well as the current afero 1.9.3 with the same results.
Workaround
A workaround is to make sure the fs is created inside the test Run() rather than in the declaration of the test cases. Such as:
To be honest, I'm not convinced my original code that was trying to share the fs between different goroutines was sensible. If this is not to be fixed, perhaps it would be worth mentioning in the readme that a MemMapFs cannot be passed between goroutines.
The text was updated successfully, but these errors were encountered:
Creating a
MemMapFs
in a table driven test running in parallel can cause an internal compiler error.Minimal reproduction test code:
Produces the error:
Versions
This works without error on golang 1.17.13.
It fails for me on go 1.18.8 and go 1.19.3.
I have tried on an older afero 1.2.2 as well as the current afero 1.9.3 with the same results.
Workaround
A workaround is to make sure the fs is created inside the test
Run()
rather than in the declaration of the test cases. Such as:To be honest, I'm not convinced my original code that was trying to share the fs between different goroutines was sensible. If this is not to be fixed, perhaps it would be worth mentioning in the readme that a MemMapFs cannot be passed between goroutines.
The text was updated successfully, but these errors were encountered: