* 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
|
||
|---|---|---|
| .. | ||
| astutil | ||
| config | ||
| dwarf | ||
| elfwriter | ||
| gobuild | ||
| goversion | ||
| locspec | ||
| logflags | ||
| proc | ||
| terminal | ||
| version | ||