sqlite
sqlite copied to clipboard
Compilation warning about memcpy with gcc 11.2.0
Hey, I'm using version 0.3.2 of this lib with go version 1.17.2 and go build
prints a compilation warning but the build of my project succeeds.
I have applied system updates last night and I believe compiler versions have changed: gcc from 10.2.1 to 11.2.0
# crawshaw.io/sqlite
In file included from ../../../go/pkg/mod/crawshaw.io/[email protected]/static.go:19:
../../../go/pkg/mod/crawshaw.io/[email protected]/./c/sqlite3.c: In function ‘sqlite3Fts5IndexQuery’:
../../../go/pkg/mod/crawshaw.io/[email protected]/./c/sqlite3.c:220863:18: warning: ‘memcpy’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
220863 | if( nToken ) memcpy(&buf.p[1], pToken, nToken);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's quite possible this would get fixed upstream in sqlite.
I'm on go1.16.8 linux/amd64 and seeing the same issue.
This is mentioned on the forum here. Warnings like this creep in from time to time and generally are nothing to be concerned about. drh knows what he's doing :)
https://sqlite.org/forum/forumpost/f5eed70bd46ede56?t=h
I believe this was fixed upstream in sqlite 3.38
Yes this was fixed upstream so would be good to update if we can.
I am seeing this issue too
https://github.com/consbio/mbtileserver/issues/144
This is still an issue. I'm getting the same warning.
This is still an issue. Ubuntu 22.04 install with GCC 11 with no changed settings and then running go install github.com/consbio/mbtileserver@latest
Does updating to master with go get crawshaw.io/sqlite@master
remove the warning for anyone?