-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
Problem when closing over variables in certain case, causes SIGSEGV: segmentation violation #481
Labels
Comments
Comment 2 by thevulgarprogrammer: I'm skipping the error checks in the snippet i showed to make it shorter, but that is not the issue. You can check a longer version of the code here: https://gist.github.com/e1c8c3f80050f6f4e76b/0481df04c2438cdce2108aaa84d813b817b7c3ba where I do check the error values. Also, if you remove line #9 ( go func() {) and the corresponding closing curly bracket, everything works fine. This leads me to believe that there is some kind of problem with the closure not retaining the "listen" variable. |
This is a compiler bug. You can work around the bug by using listen, _ := ... instead of var listen, _ = ... Labels changed: added compilerbug. Owner changed to r...@golang.org. Status changed to Accepted. |
This issue was closed by revision e0059ae. Status changed to Fixed. Merged into issue #-. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by thevulgarprogrammer:
The text was updated successfully, but these errors were encountered: