Open xhd2015 opened 6 months ago
The cgo names:
_Cgo_ptr
_Cgo_use
_cgoCheckResult
_cgo_runtime_gobytes
_cgoCheckPointer
_cgo_runtime_gostring
_cgoexp_accf84c05a34_callbackTrampoline
_cgo_cmalloc
We should add a rule: if a function starts with _, we shoud skip it.
This golang issue may be related: https://github.com/golang/go/issues/34968
Searching google: go "runtime: C malloc failed"
Fail message:
The line of code:
name := C.CString(dsn)
.After comparing xgo v1.0.26 with xgo v1.0.25, and do some bisect, found this is related to the new introduced --filepath:
The actual fileValue for this package.
The stack trace shows that the file holding cgo types is
_cgo_gotypes.go
.And by inserting a debug snippet into the go compiler:
The log shows:
Could be possibly introduced the difference between
relFile
andtrimFile
. xgo v1.0.26: use trimFile xgo v1.0.25: use relFile