-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: SIGSEGV during map lookup #6194
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
Labels
Milestone
Comments
Attaching the binary doesn't help. Show the code (cannot find it in the wild). What does 'z.add' do? 'z' is a zero value of a map thus 'z.add(k)' may panic, depending on how its written (perhaps it's initialized lazily, but who knows). OR - Is your code concurrently accessing nodesets? BTW: The type aliases {nodeid,void} used seems like a non idiomatic coding style. |
The code lives in a pending CL: https://golang.org/cl/10618043/. I should have made clear that I attached the binary so you could see (=disassemble) exactly which hashtable implementation is being used, not with the expectation that you could reproduce the crash by running it. It will take extra work to get a hermetic mostly-reproducible test case. Yes, the map is initialized lazily. z.add is defined here: func (ns *nodeset) add(n nodeid) bool { sz := len(*ns) if *ns == nil { *ns = make(nodeset) } (*ns)[n] = void{} return len(*ns) > sz } This code is not concurrent. > BTW: The type aliases {nodeid,void} used seems like a non idiomatic coding style. Maybe so for void, but I think nodeid is fine in the context; comment on the CL if you like. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attachments:
The text was updated successfully, but these errors were encountered: