2
0
Fork 0
mirror of https://github.com/ii64/sonic.git synced 2026-06-20 16:45:22 +08:00

fix: add nocheckptr directive (#365)

This commit is contained in:
Yi Duan 2023-02-20 14:52:46 +08:00 committed by GitHub
parent a978cdb8c5
commit e60b9541cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -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
run: GOMAXPROCS=4 go test -v -race -gcflags=-d=checkptr=0 ./generic_test

View file

@ -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)