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

Marshal failure with Go 1.24 rc and GOARCH=386 #707

Open
bboreham opened this issue Jan 23, 2025 · 0 comments
Open

Marshal failure with Go 1.24 rc and GOARCH=386 #707

bboreham opened this issue Jan 23, 2025 · 0 comments

Comments

@bboreham
Copy link
Contributor

I filed this as a Go bug since it is architecture-specific, but cross-posting here for visibility:

golang/go#71408

This code:

type Metadata struct {
	Type string `json:"type"`
}

func TestJsonIter(t *testing.T) {
	m := map[string][]Metadata{"item1": []Metadata{{Type: "gauge"}}, "item2": []Metadata{{Type: "summary"}}}
	json := jsoniter.ConfigCompatibleWithStandardLibrary
	s, err := json.Marshal(m)
	if err != nil {
		t.FailNow()
	}
	if len(s) < 40 {
		t.Errorf("Result too short (%d): %q", len(s), s)
	}
}

will get just one item in the output and fail the test, when run with GOARCH=386 and Go 1.24rc2.

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