X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fruntime%2Fsizeof_test.go;h=ccc0864ca9d7e04364eac1659f2bc435c87ec80e;hb=43ffe2a89230553efc9fc915e944b91438d9f1fd;hp=fb9195481aa3018b22a614e9954af18ecbff3734;hpb=f7c5cbb82087c55aa82081e931e0142783700ce8;p=gostls13.git diff --git a/src/runtime/sizeof_test.go b/src/runtime/sizeof_test.go index fb9195481a..ccc0864ca9 100644 --- a/src/runtime/sizeof_test.go +++ b/src/runtime/sizeof_test.go @@ -5,6 +5,7 @@ package runtime_test import ( + "internal/goexperiment" "reflect" "runtime" "testing" @@ -16,13 +17,18 @@ import ( func TestSizeof(t *testing.T) { const _64bit = unsafe.Sizeof(uintptr(0)) == 8 + g32bit := uintptr(252) + if goexperiment.ExecTracer2 { + g32bit = uintptr(256) + } + var tests = []struct { val any // type as a value _32bit uintptr // size on 32bit platforms _64bit uintptr // size on 64bit platforms }{ - {runtime.G{}, 252, 408}, // g, but exported for testing - {runtime.Sudog{}, 56, 88}, // sudog, but exported for testing + {runtime.G{}, g32bit, 408}, // g, but exported for testing + {runtime.Sudog{}, 56, 88}, // sudog, but exported for testing } for _, tt := range tests {