Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error when testing using race detector #8

Open
sredxny opened this issue Mar 23, 2022 · 0 comments
Open

fatal error when testing using race detector #8

sredxny opened this issue Mar 23, 2022 · 0 comments

Comments

@sredxny
Copy link

sredxny commented Mar 23, 2022

Hello, am having an issue while using this library with the race detector enabled.

the error message is: fatal error: checkptr: pointer arithmetic result points to invalid allocation

The issue is very easy to reproduce, just use the next code:

package gotiny

import (
	"github.com/niubaoshu/gotiny"
	"testing"
)

func TestGoTinyArray(t *testing.T){
	strings := []string{"1","2"}
	gotiny.Marshal(&strings)
}

Then execute the test with the race detector enabled:
go test -v -race -run TestGoTinyArray

go version: go1.16.14 darwin/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant