From e60b9541cd712c31f5949c705146e7a76e4c7cfc Mon Sep 17 00:00:00 2001 From: Yi Duan Date: Mon, 20 Feb 2023 14:52:46 +0800 Subject: [PATCH] fix: add `nocheckptr` directive (#365) --- .github/workflows/push-check-go118.yml | 6 +++--- internal/rt/stackmap.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push-check-go118.yml b/.github/workflows/push-check-go118.yml index c2d501c78..cc758fb58 100644 --- a/.github/workflows/push-check-go118.yml +++ b/.github/workflows/push-check-go118.yml @@ -25,8 +25,8 @@ jobs: - name: Unit Test run: | - GOMAXPROCS=4 go test -v -gcflags=-d=checkptr=0 ./... - GOMAXPROCS=4 go test -v -gcflags=-d=checkptr=0 ./external_jsonlib_test/... + GOMAXPROCS=4 go test -v -race -gcflags=-d=checkptr=0 ./... + GOMAXPROCS=4 go test -v -race -gcflags=-d=checkptr=0 ./external_jsonlib_test/... - name: Generic Test - run: GOMAXPROCS=4 go test -v -gcflags=-d=checkptr=0 ./generic_test \ No newline at end of file + run: GOMAXPROCS=4 go test -v -race -gcflags=-d=checkptr=0 ./generic_test \ No newline at end of file diff --git a/internal/rt/stackmap.go b/internal/rt/stackmap.go index e2c28c598..84ed9a95f 100644 --- a/internal/rt/stackmap.go +++ b/internal/rt/stackmap.go @@ -152,6 +152,7 @@ type StackMapBuilder struct { b Bitmap } +//go:nocheckptr func (self *StackMapBuilder) Build() (p *StackMap) { nb := len(self.b.B) bm := mallocgc(_StackMapSize + uintptr(nb) - 1, byteType, false)