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
On 64 bit system, the byte size of th following struct is 16:
type myStruct struct {
a int
b uint32
}
But extractVarInfoFromEntry only allocates a mem of 12 bytes for it.
When calling method of this struct with the "call" command, it will
result in this error:
write out of bounds
This patch extends the mem by adding padding bytes to the end of the
mem.
Fixesgo-delve#3364.
ZekeLu
added a commit
to ZekeLu/delve
that referenced
this issue
May 11, 2023
On 64 bit system, the byte size of the following struct is 16:
type myStruct struct {
a int
b uint32
}
But extractVarInfoFromEntry only allocates a mem of 12 bytes for it.
When calling method of this struct with the "call" command, it will
result in this error:
write out of bounds
This patch extends the mem by adding padding bytes to the end of the
mem.
Fixesgo-delve#3364.
* pkg/proc: pad variable mem in extractVarInfoFromEntry
On 64 bit system, the byte size of the following struct is 16:
type myStruct struct {
a int
b uint32
}
But extractVarInfoFromEntry only allocates a mem of 12 bytes for it.
When calling method of this struct with the "call" command, it will
result in this error:
write out of bounds
This patch extends the mem by adding padding bytes to the end of the
mem.
Fixes#3364.
* move the padding logic into newCompositeMemory
dlv version
)?go version
)?Take the following program:
and ran:
PS:
This bug is based on a real use case to print the value of
github.com/shopspring/decimal.Decimal
. This is the definition ofdecimal.Decimal
:See also this question https://stackoverflow.com/questions/76222724/is-it-possible-to-preview-github-com-shopspring-decimal-values-in-vscode-during.
The text was updated successfully, but these errors were encountered: