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

Close() causes SIGABRT after failing Bind() #3

Open
fredcy opened this issue Dec 10, 2013 · 3 comments
Open

Close() causes SIGABRT after failing Bind() #3

fredcy opened this issue Dec 10, 2013 · 3 comments

Comments

@fredcy
Copy link

fredcy commented Dec 10, 2013

If a call to Bind() fails a later call to Close() on the Ldap object causes SIGABRT. I see that Bind() sets self.conn = nil if the ldap_bind_s() call is not successful; why does it do that?

Assertion failed: (ld != NULL), function ldap_unbind_ext, file unbind.c, line 49.
SIGABRT: abort
PC=0x7fff963fc866
signal arrived during cgo execution

runtime.cgocall(0x40016e0, 0x427dd48)
    /usr/local/go/src/pkg/runtime/cgocall.c:149 +0x11b fp=0x427dd30
github.com/mqu/openldap._Cfunc_ldap_unbind(0x0, 0x0)
    github.com/mqu/openldap/_obj/_cgo_defun.c:294 +0x31 fp=0x427dd48
github.com/mqu/openldap.(*Ldap).Close(0xc210000020, 0xf, 0x427df00)
    /Users/fcy/go/src/github.com/mqu/openldap/openldap.go:134 +0x35 fp=0x427dde8
main.main()
    /Users/fcy/go/src/github.com/fredcy/examples/ldap/main.go:41 +0x676 fp=0x427df48
runtime.main()
    /usr/local/go/src/pkg/runtime/proc.c:220 +0x11f fp=0x427dfa0
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1394 fp=0x427dfa8

goroutine 3 [syscall]:
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1394
@mqu
Copy link
Owner

mqu commented Dec 25, 2013

Thank you very much for your interest for this projet. Please fork this projet ; I don't use golang any more.

@fredcy
Copy link
Author

fredcy commented Dec 26, 2013

Done. Thanks.

@hamano
Copy link

hamano commented May 22, 2015

@fredcy I fixed the issue
https://github.com/hamano/golang-openldap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants