Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
@bboreham

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /