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

Compilation warning about memcpy with gcc 11.2.0 #127

Open
MEschenbacher opened this issue Nov 4, 2021 · 8 comments
Open

Compilation warning about memcpy with gcc 11.2.0 #127

MEschenbacher opened this issue Nov 4, 2021 · 8 comments

Comments

@MEschenbacher
Copy link

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);
       |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@MEschenbacher MEschenbacher changed the title Compilation warning about memcpy with go 1.17.2 Compilation warning about memcpy with gcc 11.2.0 Nov 4, 2021
@anacrolix
Copy link
Contributor

It's quite possible this would get fixed upstream in sqlite.

@bobhenkel
Copy link

I'm on go1.16.8 linux/amd64 and seeing the same issue.

@AdamSLevy
Copy link
Collaborator

AdamSLevy commented Dec 27, 2021

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

@jduerstock
Copy link

I believe this was fixed upstream in sqlite 3.38

@leearmstrong
Copy link

Yes this was fixed upstream so would be good to update if we can.

I am seeing this issue too

consbio/mbtileserver#144

@CaptainKraft
Copy link

This is still an issue. I'm getting the same warning.

@rooton
Copy link

rooton commented Jan 8, 2023

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

@anacrolix
Copy link
Contributor

Does updating to master with go get crawshaw.io/sqlite@master remove the warning for anyone?

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.

8 participants