You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an executable test available in https://github.com/tmm1/gobug, along with a Dockerfile which runs it in an arm32 environment to replicate the failure:
There is nothing in your code forcing append to allocate a new backing array, so when you do append(prefixIdx, f.Index...), if prefixIdx has enough capacity it can use the same backing array and your 2 slices point to the same space.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?I have observed this bug on android and linux-based embedded ARM systems, primarily with 32-bit operating systems.
What did you do?
I'm using a simple reflection loop to capture field indices into a global lookup map. On ARM systems, I noticed that the captured value is incorrect.
The code responsible looks like:
changing it to the following fixes the issue:
I have an executable test available in https://github.com/tmm1/gobug, along with a Dockerfile which runs it in an arm32 environment to replicate the failure:
The text was updated successfully, but these errors were encountered: