Unit tests are fails with SIGSEGV on OpenBSD
Good day,
An attempt to run unit tests on OpenBSD is failed as:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb89edc]
goroutine 1 [running]:
modernc.org/libc.(*TLS).setErrno(0xf62a60?, {0x230380?, 0x3b2988?})
/usr/ports/pobj/trdsql-1.0.0/go/pkg/mod/modernc.org/[email protected]/etc.go:190 +0xdc
modernc.org/libc.Xmalloc(0x0, 0x25b4e0?)
/usr/ports/pobj/trdsql-1.0.0/go/pkg/mod/modernc.org/[email protected]/mem.go:37 +0xc5
modernc.org/libc.init()
/usr/ports/pobj/trdsql-1.0.0/go/pkg/mod/modernc.org/[email protected]/libc_openbsd.go:49 +0x3bc
FAIL github.com/noborus/trdsql 0.043s
FAIL
Thank you for the issue.
From the error, it was built with CGO_ENABLED=0. Please consider building with CGO_ENABLED=1.
And from the error, it looks like a similar issue to https://gitlab.com/cznic/libc/-/issues/34.
When I try to upgrade modernc.org/sqlite, it requires go1.21, so trdsql is hesitant to upgrade. If you need to, I recommend upgrading modernc.org/sqlite.
When I try to upgrade modernc.org/sqlite, it requires go1.21, so trdsql is hesitant to upgrade. If you need to, I recommend upgrading modernc.org/sqlite.
Any reason to not upgrade go?
Any reason to not upgrade go?
I would like to keep old versions of go as much as possible, because there is a demand to run trdsql on older OS.
It is easy to compile with newer go versions, but if you increase the target version, it becomes difficult to compile with older go versions.
I see that you have updated modernc.org/sqlite by https://github.com/noborus/trdsql/commit/5055c50fd5bd3a2dc633727263996c256ad027ca and https://github.com/noborus/trdsql/commit/d310df8b45fce5618a75e323bf32b2b5b8b91128
So, I close that issue because it's unrelevnt anymore.