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

Errors creating symbol names on import of binary #3

Open
deliciouslytyped opened this issue May 23, 2019 · 6 comments
Open

Errors creating symbol names on import of binary #3

deliciouslytyped opened this issue May 23, 2019 · 6 comments

Comments

@deliciouslytyped
Copy link

Error creating symbol: type.struct {} - Symbol name contains invalid characters: type.struct {}
Error creating symbol: go.(*struct { sync.Mutex; reflect.m sync.Map }).Unlock - Symbol name contains invalid characters: go.(*struct { sync.Mutex; reflect.m sync.Map }).Unlock
@felberj
Copy link
Owner

felberj commented May 23, 2019

Do you know the version of go that was used to compile this binary?
Do you happen to have the source of this binary?

@deliciouslytyped
Copy link
Author

Yes and yes, I'm not very familiar with go though and I don't think I'm in a position to share the source. I'll see what I can do.

@deliciouslytyped
Copy link
Author

Ok, I think it may have been go 1.11.6 and you specified 1.12

@felberj
Copy link
Owner

felberj commented May 23, 2019

Thanks! If your binary is not striped, you can just disable the "Go Function Name Analyzer". It looks like there are anonymous structs and I did not yet play around with those.

@deliciouslytyped
Copy link
Author

Unless I messed up my build script, I get the same errors with 1.12.

@felberj
Copy link
Owner

felberj commented May 23, 2019

Can you try to provide a minimal code snipped with this go.(*struct { sync.Mutex; reflect.m sync.Map }).Unlock symbol? You might need to compile it like in https://github.com/felberj/gotools/blob/master/testdata/Makefile to avoid optimisations.

I am not sure what the best solution for this is. We might want to filter out these symbols, or as a quick and dirty hack just ignore them like here: https://github.com/felberj/gotools/blob/master/src/main/java/gotools/GoFunctionNameAnalyzer.java#L76

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

No branches or pull requests

2 participants