proc: do not try to load a non-empty slice if the base address is 0 (#3295)

This commit is contained in:
Alessandro Arzilli
2023-03-01 20:27:06 +01:00
committed by GitHub
parent 372552bf1f
commit 212c2002bb
3 changed files with 13 additions and 1 deletions

View File

@ -829,6 +829,9 @@ func TestEvalExpression(t *testing.T) {
// Conversions to ptr-to-ptr types
{`**(**runtime.hmap)(uintptr(&m1))`, false, ``, ``, "runtime.hmap", nil},
// Malformed values
{`badslice`, false, `(unreadable non-zero length array with nil base)`, `(unreadable non-zero length array with nil base)`, "[]int", nil},
}
ver, _ := goversion.Parse(runtime.Version())