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

CGo Pointer Errors #158

Open
aevangeline opened this issue Feb 20, 2017 · 5 comments · May be fixed by #167
Open

CGo Pointer Errors #158

aevangeline opened this issue Feb 20, 2017 · 5 comments · May be fixed by #167

Comments

@aevangeline
Copy link

Hello! I'm using this library to do Logistic Regression on some metadata signals from an internal system at my employer. However, I've run into the following panic :

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 1 [running]:
github.com/sjwhitworth/golearn/linear_models.Train.func1(0xc42049bc20, 0xc42727b280, 0x931f)
	/Users/babarin/code/src/github.com/sjwhitworth/golearn/linear_models/liblinear.go:61 +0xb3
github.com/sjwhitworth/golearn/linear_models.Train(0xc42049bc20, 0xc42727b280, 0x931f)
	/Users/babarin/code/src/github.com/sjwhitworth/golearn/linear_models/liblinear.go:61 +0x42
github.com/sjwhitworth/golearn/linear_models.(*LogisticRegression).Fit(0xc42731a040, 0x4243a40, 0xc42727b600, 0x4243a40, 0xc42727b600)
	/Users/babarin/code/src/github.com/sjwhitworth/golearn/linear_models/logistic.go:34 +0xd3
main.main()
	/Users/babarin/code/src/code.justin.tv/chat/classy/classifier/spam/learn/analyze.go:420 +0x944
exit status 2


---

I can bulldoze by this error by using GODEBUG=cgocheck=0, but this isn't ideal.

@amclay
Copy link

amclay commented Apr 4, 2017

Also running into this issue with go 1.8

@Sentimentron
Copy link
Collaborator

Yeah, this might require a bit of a design change, I'll do some investigation.

@Sentimentron Sentimentron linked a pull request Apr 9, 2017 that will close this issue
@Sentimentron
Copy link
Collaborator

Fix is coming in #167, but I've managed to mess up the memory management 👎

@amclay
Copy link

amclay commented Jan 24, 2018

@Sentimentron Do you have plans to support/revisit this at a later date still?

@rjzak
Copy link

rjzak commented Feb 22, 2020

Two years later, I'm getting the same issue.

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

Successfully merging a pull request may close this issue.

4 participants