From ca9c302d807f47a55552d0a20a2dfcdb0fcc6e28 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 24 Jan 2018 11:35:22 +0100 Subject: pkg/compiler, prog: fix template parent lens It's possible that a struct can have 2+ parents, which is the same template (differs only by arguments). See the new test case. Support such case. --- prog/size_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'prog/size_test.go') diff --git a/prog/size_test.go b/prog/size_test.go index 8f472491d..2ab28b90b 100644 --- a/prog/size_test.go +++ b/prog/size_test.go @@ -130,6 +130,10 @@ func TestAssignSize(t *testing.T) { "syz_test$length23(&(0x7f0000000000)={0x1, {0x2, 0x0}})", "syz_test$length23(&(0x7f0000000000)={0x1, {0x2, 0x6}})", }, + { + "syz_test$length24(&(0x7f0000000000)={{0x0, {0x0}}, {0x0, {0x0}}})", + "syz_test$length24(&(0x7f0000000000)={{0x0, {0x8}}, {0x0, {0xc}}})", + }, } for i, test := range tests { -- cgit mrf-deployment