Giter VIP home page Giter VIP logo

go-json's Introduction

trophy

go-json's People

Contributors

abrander avatar asaf-shitrit avatar brongineers avatar cuonglm avatar goccy avatar guillaumerochat avatar incsw avatar jxskiss avatar kimhyeonwoo avatar kiraub avatar lestrrat avatar misyuari avatar orisano avatar peterlimg avatar preethamrn avatar trim21 avatar vearutop avatar willabides avatar zchee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-json's Issues

Add go-fuzz support?

I tried to use go-json with large codebase that's currently using segmentio/encoding/json and found that a number of tests failed based on what appeared to be subtle bugs in input handling. This suggests that go-json has not been subjected to fuzzing to shake out input-handling bugs and therefore might not be safe to handle untrusted input. Looking through the issue tracker for go-json suggests many of the issues have been around crashes or similar, which seems to confirm this.

Have you considered adding support for go-fuzz and fixing issues it finds? There's code to test encoding/json and a starting corpus based on exercising codepaths in it at https://github.com/dvyukov/go-fuzz-corpus/blob/master/json that might be useful.

Alternatively, https://github.com/segmentio/encoding/tree/master/json/fuzz uses a fork of this to find differences between the segment.io json implementation and encoding/json. What guarantees does go-json want to provide around differences from encoding/json? Are you willing to consider cases where encoding/json can unmarshal but go-json returns an error or vice-versa a bug?

In playing around with a fork of https://github.com/segmentio/encoding/tree/master/json/fuzz locally, it seems to have found some issues after running for a few hours on my laptop, even after relaxing the guarantee about error messages exactly matching.

Do you want to play around with this yourselves? Or can I offer the fuzz package as a PR? It would be Apache 2 licensed, with a copyright of "go-fuzz project authors".

I can also attempt to turn its output into individual bugs reports, but I suspect that path will be slower and incomplete.

Let me know how you want to proceed. Thanks!

-- Aaron

Invalid JSON produced when embedding structs

Hi, tried your lib on a fairly large project. Was able to make a reproducable example where lib produces incorrect JSON, here it is:

package main

import (
	"fmt"
	"github.com/goccy/go-json"
)

type Boo struct{ B string }
type Struct struct {
	A   int
	Boo *Boo
}
type Embedded struct {
	Struct
}

func main() {
	e := Embedded{Struct: Struct{
		A:   1,
		Boo: &Boo{B: "foo"},
	}}
	data, err := json.Marshal(e)
	fmt.Println(err)
	fmt.Println(string(data))
}

Prints:

<nil>
{"A":1,"Boo":"B":"foo"}

Note that Boo is lacking braces {}. And this is what "encoding/json" produces:

{"A":1,"Boo":{"B":"foo"}}

And a bonus problem, while I was trying to make a reproducable case, I noticed that if you rename Boo field above to just B, e.g.

package main

import (
	"fmt"
	"github.com/goccy/go-json"
)

type Boo struct{ B string }
type Struct struct {
	A int
	B *Boo
}
type Embedded struct {
	Struct
}

func main() {
	e := Embedded{Struct: Struct{
		A:   1,
		B: &Boo{B: "foo"},
	}}
	data, err := json.Marshal(e)
	fmt.Println(err)
	fmt.Println(string(data))
}

Library stops marshalling that field completely:

<nil>
{"A":1}

What "encoding/json" lib produces:

{"A":1,"B":{"B":"foo"}}

if have two struct tag options, ignored last tag option.

go version: go1.16.3 linux/amd64
go-json version: github.com/goccy/go-json v0.4.13

What happened?

if have two struct tag options, ignored last tag option.

        // ignored string
	IntOmitStr     int      `json:"int_omit_str,omitempty,string"`
        // ignored omitempty
	IntStrOmit     int      `json:"int_str_omit,string,omitempty"`

diff encoding/json

test code
package main

import (
	stdjson "encoding/json"
	"testing"

	gojson "github.com/goccy/go-json"
	"github.com/google/go-cmp/cmp"
)

type A struct {
	Int            int      `json:"int"`
	IntStr         int      `json:"int_str,string"`
	IntOmit        int      `json:"int_omit,omitempty"`
	IntOmitStr     int      `json:"int_omit_str,omitempty,string"`
	IntStrOmit     int      `json:"int_str_omit,string,omitempty"`
	Float          float64  `json:"float"`
	FloatStr       float64  `json:"float_str,string"`
	FloatOmit      float64  `json:"float_omit,omitempty"`
	FloatOmitStr   float64  `json:"float_omit_str,omitempty,string"`
	FloatStrOmit   float64  `json:"float_str_omit,string,omitempty"`
	Bool           bool     `json:"bool"`
	BoolStr        bool     `json:"bool_str,string"`
	BoolOmit       bool     `json:"bool_omit,omitempty"`
	BoolOmitStr    bool     `json:"bool_omit_str,omitempty,string"`
	BoolStrOmit    bool     `json:"bool_str_omit,string,omitempty"`
	Str            string   `json:"str"`
	StrOmit        string   `json:"str_omit,omitempty"`
	ArrStr         []string `json:"arrstr"`
	ArrStrOmit     []string `json:"arrstr_omit,omitempty"`
	ArrInt         []int    `json:"arrint,omitempty"`
	ArrIntOmit     []int    `json:"arrint_omit,omitempty"`
	IntOmitInvalid int      `json:"int_omit_invalid,a,b,string,omitempty"`
}

func TestMarshal(t *testing.T) {
	tests := map[string]A{
		"empty": {},
		"full": {
			Int:            1,
			IntStr:         1,
			IntOmit:        1,
			IntOmitStr:     1,
			IntStrOmit:     1,
			Float:          1.1,
			FloatStr:       1.1,
			FloatOmit:      1.1,
			FloatOmitStr:   1.1,
			FloatStrOmit:   1.1,
			Bool:           true,
			BoolStr:        true,
			BoolOmit:       true,
			BoolOmitStr:    true,
			BoolStrOmit:    true,
			Str:            "1",
			StrOmit:        "1",
			ArrStr:         []string{"0", "1"},
			ArrStrOmit:     []string{"0", "1"},
			ArrInt:         []int{0, 1},
			ArrIntOmit:     []int{0, 1},
			IntOmitInvalid: 1,
		},
	}

	for desc, tt := range tests {
		t.Run(desc, func(t *testing.T) {
			gojsonResult, err := gojson.MarshalIndent(tt, "", "    ")
			if err != nil {
				t.Fatalf("gojson error: %v", err)
			}
			stdjsonResult, err := stdjson.MarshalIndent(tt, "", "    ")
			if err != nil {
				t.Fatalf("stdjson error: %v", err)
			}
			t.Logf("\n============\ngojson: %s\nstdjson: %s\n============\n", string(gojsonResult), string(stdjsonResult))
			if r := cmp.Diff(gojsonResult, stdjsonResult); r != "" {
				t.Fatalf("Diff: %s", r)
			}
		})
	}
}

func TestUnmarshal(t *testing.T) {
	tests := map[string][]byte{
		"empty": []byte("{}"),
		"full":  []byte(`{ "int": 1, "int_str": "1", "int_omit": 1, "int_omit_str": "1", "int_str_omit": "1", "float": 1.1, "float_str": "1.1", "float_omit": 1.1, "float_omit_str": "1.1", "float_str_omit": "1.1", "bool": true, "bool_str": "true", "bool_omit": true, "bool_omit_str": "true", "bool_str_omit": "true", "str": "1", "str_omit": "1", "arrstr": [ "0", "1" ], "arrstr_omit": [ "0", "1" ], "arrint": [ 0, 1 ], "arrint_omit": [ 0, 1 ], "int_omit_invalid": "1" }`),
	}

	for desc, tt := range tests {
		t.Run(desc, func(t *testing.T) {
			var stdjsonResult A
			if err := stdjson.Unmarshal(tt, &stdjsonResult); err != nil {
				t.Fatalf("stdjson error: %v", err)
			}
			var gojsonResult A
			if err := gojson.Unmarshal(tt, &gojsonResult); err != nil {
				t.Fatalf("gojson error: %v", err)
			}
			t.Logf("\n============\ngojson: %v\nstdjson: %v\n============\n", gojsonResult, stdjsonResult)
			if r := cmp.Diff(gojsonResult, stdjsonResult); r != "" {
				t.Fatalf("Diff: %s", r)
			}
		})
	}
}
result
--- FAIL: TestMarshal (0.01s)
    --- FAIL: TestMarshal/empty (0.00s)
        gojson_test.go:75: 
            ============
            gojson: {
                "int": 0,
                "int_str": "0",
                "int_str_omit": "0",
                "float": 0,
                "float_str": "0",
                "float_str_omit": "0",
                "bool": false,
                "bool_str": "false",
                "bool_str_omit": "false",
                "str": "",
                "arrstr": null,
                "int_omit_invalid": 0
            }
            stdjson: {
                "int": 0,
                "int_str": "0",
                "float": 0,
                "float_str": "0",
                "bool": false,
                "bool_str": "false",
                "str": "",
                "arrstr": null
            }
            ============
        gojson_test.go:77: Diff:   []uint8(
                """
                {
                    "int": 0,
                    "int_str": "0",
            -       "int_str_omit": "0",
                    "float": 0,
                    "float_str": "0",
            -       "float_str_omit": "0",
                    "bool": false,
                    "bool_str": "false",
            -       "bool_str_omit": "false",
                    "str": "",
            -       "arrstr": null,
            -       "int_omit_invalid": 0
            +       "arrstr": null
                }
                """
              )
    --- FAIL: TestMarshal/full (0.00s)
        gojson_test.go:75: 
            ============
            gojson: {
                "int": 1,
                "int_str": "1",
                "int_omit": 1,
                "int_omit_str": 1,
                "int_str_omit": "1",
                "float": 1.1,
                "float_str": "1.1",
                "float_omit": 1.1,
                "float_omit_str": 1.1,
                "float_str_omit": "1.1",
                "bool": true,
                "bool_str": "true",
                "bool_omit": true,
                "bool_omit_str": true,
                "bool_str_omit": "true",
                "str": "1",
                "str_omit": "1",
                "arrstr": [
                    "0",
                    "1"
                ],
                "arrstr_omit": [
                    "0",
                    "1"
                ],
                "arrint": [
                    0,
                    1
                ],
                "arrint_omit": [
                    0,
                    1
                ],
                "int_omit_invalid": 1
            }
            stdjson: {
                "int": 1,
                "int_str": "1",
                "int_omit": 1,
                "int_omit_str": "1",
                "int_str_omit": "1",
                "float": 1.1,
                "float_str": "1.1",
                "float_omit": 1.1,
                "float_omit_str": "1.1",
                "float_str_omit": "1.1",
                "bool": true,
                "bool_str": "true",
                "bool_omit": true,
                "bool_omit_str": "true",
                "bool_str_omit": "true",
                "str": "1",
                "str_omit": "1",
                "arrstr": [
                    "0",
                    "1"
                ],
                "arrstr_omit": [
                    "0",
                    "1"
                ],
                "arrint": [
                    0,
                    1
                ],
                "arrint_omit": [
                    0,
                    1
                ],
                "int_omit_invalid": "1"
            }
            ============
        gojson_test.go:77: Diff:   []uint8(
                """
                ... // 2 identical lines
                    "int_str": "1",
                    "int_omit": 1,
            -       "int_omit_str": 1,
            +       "int_omit_str": "1",
                    "int_str_omit": "1",
                    "float": 1.1,
                    "float_str": "1.1",
                    "float_omit": 1.1,
            -       "float_omit_str": 1.1,
            +       "float_omit_str": "1.1",
                    "float_str_omit": "1.1",
                    "bool": true,
                    "bool_str": "true",
                    "bool_omit": true,
            -       "bool_omit_str": true,
            +       "bool_omit_str": "true",
                    "bool_str_omit": "true",
                    "str": "1",
                ... // 15 identical lines
                        1
                    ],
            -       "int_omit_invalid": 1
            +       "int_omit_invalid": "1"
                }
                """
              )
--- FAIL: TestUnmarshal (0.00s)
    --- FAIL: TestUnmarshal/full (0.00s)
        gojson_test.go:97: gojson error: json: cannot unmarshal number " into Go struct field A.IntOmitStr of type int
FAIL
FAIL    command-line-arguments  0.013s
FAIL

Decode use more time and mem on large json

When decode one large json bytes, go-json use more time and more mem than origin golang's json package.

testcode:

package main

import (
	"fmt"
	"os"

	gojson "github.com/goccy/go-json"
	// jsoniter "github.com/json-iterator/go"
)

type coordinate struct {
	X    float64                `json:"x"`
	Y    float64                `json:"y"`
	Z    float64                `json:"z"`
	Name string                 `json:"name"`
	Opts map[string]interface{} `json:"opts"`
}

type testStruct struct {
	Coordinates []coordinate `json:"coordinates"`
}

func main() {
	dat, err := os.ReadFile("./1.json")
	if err != nil {
		panic(err)
	}

	jobj := testStruct{}
	// err = json.Unmarshal(dat, &jobj)
	err = gojson.Unmarshal(dat, &jobj)
	// err = jsoniter.Unmarshal(dat, &jobj)
	if err != nil {
		panic(err)
	}

	x, y, z := 0.0, 0.0, 0.0

	for _, coord := range jobj.Coordinates {
		x += coord.X
		y += coord.Y
		z += coord.Z
	}

	len := float64(len(jobj.Coordinates))
	fmt.Printf("%.8f\n%.8f\n%.8f\n", x/len, y/len, z/len)
}

test large json file: 1.json.zip

on my machine:

  • origin json: 279.6247ms 64.1Mb
  • go-json: 362.6054ms 211.1Mb
  • jsoniter: 171.8712ms 64.2Mb

Unable to encode the structure prefixed by omitempty

For example,

package main

import (
	"os"

	"github.com/goccy/go-json"
)

type tmp struct {
	OmitEmpty int  `json:"omit_empty,omitempty"`
	Bar       bool `json:"bar"`
}

func main() {
	t := tmp{
		OmitEmpty: 0,
		Bar:       true,
	}

	json.NewEncoder(os.Stdout).Encode(t)
}
expected: {"bar":true}
actual: {,"bar":true}

go-json panic with custom marshar & struct embed & float field?

go-json panics with the following code. error log

I found it when testing go-language-server/protocol and marshal of InitializedParams failed with the panic.
Interestingly, it only fails only when I filled other float64 fields and struct embed seems to be necessary steps to reproduce.

  • go version: 1.16
  • go-json version: v0.4.7 (latest)
package main

import (
	"encoding/json"
	"fmt"

	gojson "github.com/goccy/go-json"
)

type ProgressToken struct {
	name   string
	number int64
}

// MarshalJSON implements json.Marshaler.
func (v *ProgressToken) MarshalJSON() ([]byte, error) {
	// It uses encoding/json but it's reproducible with go-json as well.
	if v.name != "" {
		return json.Marshal(v.name)
	}
	return json.Marshal(v.number)
}

type WorkDoneProgressParams struct {
	// WorkDoneToken an optional token that a server can use to report work done progress.
	WorkDoneToken *ProgressToken `json:"workDoneToken,omitempty"`
}

type X struct {
	WorkDoneProgressParams
	ProcessID float64 `json:"processId"`
}

var _ = gojson.Marshal
var _ = json.Marshal

func main() {
	x := &X{
		// WorkDoneProgressParams: WorkDoneProgressParams{WorkDoneToken: &ProgressToken{name: "hoge"}}, // => signal: killed with comment out
		ProcessID: 14, // <- need float64 field?
	}
	b, _ := gojson.Marshal(x) // ng
	// b, _ := json.Marshal(x) // ok
	fmt.Println(string(b))
}

Fix checkptr validation issue

As a #52 (comment), we should pass checkptr validation.

I'd short dig checkptr algorithm with Go runtime source code level, and found quickly fixing way. but still un-safe a bit. (means can force ignore, so might be also ignores actual checkptr problem.
Will continue to fixing way.

Ideas for unique features

This issue is to summarize go-json's unique features that we plan to implement in the future.

Features

context.Context support for Marshaler and Unmarshaler

I plan to provide the two APIs follows:

  • json.MarshalContext(context.Context, interface{}, ...json.EncodeOption) ([]byte, error)
  • json.UnmarshalContext(context.Context, []byte, interface{}, ...json.DecodeOption) error

Then, if we implemented the following interface, callback it.

type MarshalerContext interface {
  MarshalJSON(context.Context) ([]byte, error)
}

type UnmarshalerContext interface {
  UnmarshalJSON(context.Context, []byte) error
}

Why

I thought there were situations in MarshalJSON and UnmashalJSON where I wanted to use context.Context .

For example, we consider the situation that in MarshalJSON, you want to access external middleware, get the data, and then encode it. At this time, context.Context may be required when accessing middleware, we want to use the context.Context not created inside MarshalJSON but used by the caller of json.Marshal().
I show this situation's sample code the following:

type User struct {
  ID int64
  Name string
  UserAddress UserAddressResolver
}

type UserAddressResolver func(ctx context.Context) (*UserAddress, error)
func (r UserAddressResolver) MarshalJSON() ([]byte, error) {
  ctx := context.Background() // we want to use parent context.Context but we can't get it.
  address, err := r(ctx) // fetch UserAddress data from external middleware
  if err != nil {
    return nil, err
  }
  return json.Marshal(address)
}

type UserAddress struct {
  ID int64
  UserID int64
  PostCode string
  Address string
}

u := &User{ID: 1, Name: "alice"}
u.UserAddress = func(ctx context.Context) (*UserAddress, error) {
  return db.FindUserAddressByUserID(ctx, u.ID)
}

json.Marshal(u)

In this case, there is no way to pass context.Context to MarshalJSON , so I think that an approach like json.MarshalContext is necessary.

Using goccy/go-json instead of encoding/json fails a few tests in an existing project

This draft PR swaggest/rest#24 migrates to goccy/go-json by changing imports. Unfortunately such a change leads to test failures and a panic.

Relevant GitHub Actions log: https://github.com/swaggest/rest/pull/24/checks?check_run_id=1861642353.

Panic message.
panic: runtime error: index out of range [824626223968] with length 730624 [recovered]
	panic: runtime error: index out of range [824626223968] with length 730624

goroutine 28 [running]:
testing.tRunner.func1.1(0xe85180, 0xc0006c8a80)
	/opt/hostedtoolcache/go/1.15.7/x64/src/testing/testing.go:1072 +0x46a
testing.tRunner.func1(0xc001370000)
	/opt/hostedtoolcache/go/1.15.7/x64/src/testing/testing.go:1075 +0x636
panic(0xe85180, 0xc0006c8a80)
	/opt/hostedtoolcache/go/1.15.7/x64/src/runtime/panic.go:975 +0x47a
github.com/goccy/go-json.(*Decoder).compileToGetDecoder(0xc001265278, 0xc0006e2d00, 0xc0006e2d00, 0x0, 0x0, 0x440191, 0x417ed0)
	/home/runner/work/rest/rest/vendor/github.com/goccy/go-json/decode_compile_race.go:16 +0x412
github.com/goccy/go-json.(*Decoder).decode(0xc001265278, 0xc0006c8a60, 0x14, 0x14, 0xc0000e7238, 0x4837e0, 0x4837e0)
	/home/runner/work/rest/rest/vendor/github.com/goccy/go-json/decode.go:71 +0x125
github.com/goccy/go-json.(*Decoder).decodeForUnmarshal(0xc001265278, 0xc0006c8a60, 0x14, 0x14, 0xc0006e2d00, 0xc00136a360, 0xc0006e2d00, 0xc00136a360)
	/home/runner/work/rest/rest/vendor/github.com/goccy/go-json/decode.go:84 +0x9b
github.com/goccy/go-json.Unmarshal(0xc0012652f8, 0x13, 0x20, 0xc0006e2d00, 0xc00136a360, 0x20, 0x4345f8)
	/home/runner/work/rest/rest/vendor/github.com/goccy/go-json/json.go:268 +0xe5
github.com/swaggest/rest/request.(*DecoderFactory).jsonParams.func1.1(0xc0006c8a40, 0x13, 0xc0012658b8, 0xc00134f8e8, 0xe4fe01, 0x101)
	/home/runner/work/rest/rest/request/factory.go:164 +0x3bb
github.com/swaggest/form.(*decoder).setFieldByType(0xc0006da900, 0xe4fee0, 0xc00136a300, 0x199, 0xc0006bee40, 0x6, 0x40, 0x0, 0x5)
	/home/runner/work/rest/rest/vendor/github.com/swaggest/form/decoder.go:194 +0x79c2
github.com/swaggest/form.(*decoder).traverseStruct(0xc0006da900, 0xe48660, 0xc00136a300, 0x199, 0x1143c20, 0xe48660, 0xc0006bee40, 0x0, 0x40, 0x0)
	/home/runner/work/rest/rest/vendor/github.com/swaggest/form/decoder.go:175 +0x385
github.com/swaggest/form.(*Decoder).Decode(0xc0006e2c80, 0xe0e920, 0xc00136a300, 0xc00130ff50, 0x0, 0x0, 0x0, 0x418620, 0xc0006b1cc0)
	/home/runner/work/rest/rest/vendor/github.com/swaggest/form/form_decoder.go:166 +0x385
github.com/swaggest/rest/request.makeDecoder.func1(0xc0006b9d00, 0xe0e920, 0xc00136a300, 0x0, 0x0, 0x5a191e, 0xc001370000)
	/home/runner/work/rest/rest/request/decoder.go:40 +0x213
github.com/swaggest/rest/request.(*decoder).Decode(0xc00130fe60, 0xc0006b9d00, 0xe0e920, 0xc00136a300, 0x0, 0x0, 0x0, 0x0)
	/home/runner/work/rest/rest/request/decoder.go:55 +0x14b
github.com/swaggest/rest/request_test.TestDecoder_Decode_jsonParam(0xc001370000)
	/home/runner/work/rest/rest/request/decoder_test.go:305 +0x179
testing.tRunner(0xc001370000, 0xef5d48)
	/opt/hostedtoolcache/go/1.15.7/x64/src/testing/testing.go:1123 +0x203
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.15.7/x64/src/testing/testing.go:1168 +0x5bc

Decoding `map` with nested Object gets only first element

Decoding map with nested Object gets only first element.

Reproduction code

package main

import (
	encodingjson "encoding/json"
	"fmt"

	goccyjson "github.com/goccy/go-json"
)

func main() {
	// gets all elements
	ok := `{
  "a": 1,  
  "b": "2",
  "c": null
}`

	// gets only first element (`a` with `nestedA`)
	ng := `{
  "a": {
    "nestedA": "value of nested a"
  },  
  "b": {
    "nestedB": "value of nested b"
  },  
  "c": {
    "nestedC": "value of nested c"
  }
}`

	fmt.Println("encoding/json")
	for _, s := range []string{ok, ng} {
		var m map[string]interface{}
		err := encodingjson.Unmarshal([]byte(s), &m)
		if err != nil {
			panic(err)
		}
		fmt.Println(m)
	}

	fmt.Println("goccy/go-json")
	for _, s := range []string{ok, ng} {
		var m map[string]interface{}
		err := goccyjson.Unmarshal([]byte(s), &m)
		if err != nil {
			panic(err)
		}
		fmt.Println(m)
	}
}

encoding/json
map[a:1 b:2 c:]
map[a:map[nestedA:value of nested a] b:map[nestedB:value of nested b] c:map[nestedC:value of nested c]]
goccy/go-json
map[a:1 b:2 c:]
map[a:map[nestedA:value of nested a]]

https://play.golang.org/p/wzNqCqm3Ryl

`Unmarshal` fails when decoding `null` as string

Unmarshal fails when decoding null as string.
Referring to encoding/json, the expected result is an empty string.

Reproduction code

https://play.golang.org/p/-mRPc-XSadc

package main

import (
	"fmt"

	"github.com/goccy/go-json"
)

type Message struct {
	Field string `json:"field"`
}

func main() {
	ok := `{"field": "value"}`
	ng := `{"field": null}`
	
	for _, s := range []string{ok, ng} {
		var msg Message
		err := json.Unmarshal([]byte(s), &msg)
		if err != nil {
			panic(err) // panics for `ng`
		}
		fmt.Println(msg)
	}
}

Set max size when reading

I'm attempting to limit the amount of bytes read per call to decoder.Decode with a bufio.NewReaderSize:

bufioReader := bufio.NewReaderSize(r, size)
decoder := json.NewDecoder(bufioReader)

When I decode json, however, it is decoding the entire line:

package main

import (
	"bufio"
	"fmt"
	"io"
	"log"
	"strings"

	"github.com/goccy/go-json"
)

func main() {
	const jsonStream = `
	{"Name": "Sam", "Text": "Who's there?"}
	{"Name": "Ed", "Text": "Go fmt."}
	{"Name": "Sam", "Text": "Go fmt who?"}
	{"Name": "Ed", "Text": "Go fmt yourself!"}
`
	type Message struct {
		Name, Text string
	}
	var r io.Reader
	r = strings.NewReader(jsonStream)
	r = bufio.NewReaderSize(r, 8)
	dec := json.NewDecoder(r)
	for {
		var m Message
		if err := dec.Decode(&m); err == io.EOF {
			break
		} else if err != nil {
			log.Fatal(err)
		}
		fmt.Printf("%s: %s\n", m.Name, m.Text)
	}
}

Is there any way to enforce this within the library, so that if if a line of JSON is too long, the decoder will error out and move on to the next line?

Pointer corruption during decoding

While testing goccy/go-json (v0.4.8) as easyjson replacement with a larger project, tests in our test suite would fail unpredictably. Goccy/go-json was used only for unmarshaling. It looks like pointers get mixed up / corrupted sometimes, resulting in either invalid data, panics or errors when the GC detects pointers to released memory.

For one case I managed to write a test to reproduce the behaviour.

package main

import (
	"fmt"

	"github.com/goccy/go-json"
)

type B struct{ Int int32 }

type A struct{ B *B }

type X struct{ A []*A }

func main() {

	w1 := &X{}
	w2 := &X{}

	json.Unmarshal([]byte(`{"a": [ {"b":{"int": 42} } ] }`), w1)
	fmt.Printf("%p => %d\n", &w1.A[0].B.Int, w1.A[0].B.Int)

	json.Unmarshal([]byte(`{"a": [ {"b":{"int": 112} } ] }`), w2)
	fmt.Printf("%p => %d\n", &w1.A[0].B.Int, w1.A[0].B.Int)
	fmt.Printf("%p => %d\n", &w2.A[0].B.Int, w2.A[0].B.Int)

}

Output

x1 0xc0000ae084 => 42
x1 0xc0000ae084 => 112
x2 0xc0000ae084 => 112

All Bs seem to point to the same address but they should not. Unmarshalling the second JSON string into x2 overrides data in x1

program crashed

Here is my code:
Go version 1.16

package main

import (
	"os"

	"github.com/goccy/go-json"
)

func main() {
	file, _ := os.Open("file")
	defer file.Close()
	decoder := json.NewDecoder(file)
	data := map[string]interface{}{}
	for i := 0; i < 1000; i++ {
		decoder.Decode(&data)
		//fmt.Println(data)
	}

}

It works fine till 900 sentences, but crashes at 1000 with the following message:

(base) ~/gocode/test$ ./json_go 
panic: runtime error: slice bounds out of range [28:26]
goroutine 1 [running]:
github.com/goccy/go-json.decodeEscapeString(0xc000518000, 0x0, 0x0)
/pkg/mod/github.com/goccy/[email protected]/decode_string.go:136 +0xfa5

found bad pointer in Go heap error

Currently, the encoder sometimes gives the found bad pointer in Go heap or found pointer to free object error.
It may be related to garbage collection.


Reproduce:

  • GCGC=1 is required. apply GC pressure to the test
  • -gcflags='all=-N -l' is not required. If omitted, that error happens about once in 10 times
$ GOGC=1 go1.15.5 test -v -count 1 -run=. -gcflags='all=-N -l' .
.
.
.
runtime: pointer 0xc0002abdc8 to unused region of span span.base()=0xc00022c000 span.limit=0xc000232000 span.state=1
runtime: found in object at *(0xc000103140+0x18)
object=0xc000103140 s.base()=0xc000102000 s.limit=0xc000103fe0 s.spanclass=14 s.elemsize=96 s.state=mSpanInUse
 *(object+0) = 0x0
 *(object+8) = 0x0
 *(object+16) = 0x127d000
=== RUN   Test_MarshalJSON
 *(object+24) = 0xc0002abdc8 <==
 *(object+32) = 0xc0002abdf8
 *(object+40) = 0xc0002abdf8
 *(object+48) = 0x0=== RUN   Test_MarshalJSON/*struct

 *(object+56) = 0x0
 *(object+64) = 0x0
 *(object+72) = 0x6000106
 *(object+80) = 0x0
 *(object+88) = 0xffffffffffffffff
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

runtime stack:
runtime.throw(0x12c1de1, 0x3e)
	/Users/zchee/sdk/go1.15.5/src/runtime/panic.go:1116 +0x72 fp=0x70000d27dd98 sp=0x70000d27dd68 pc=0x103ccb2
runtime.badPointer(0x8a7b810, 0xc0002abdc8, 0xc000103140, 0x18)
	/Users/zchee/sdk/go1.15.5/src/runtime/mbitmap.go:380 +0x255 fp=0x70000d27dde0 sp=0x70000d27dd98 pc=0x1018375
runtime.findObject(0xc0002abdc8, 0xc000103140, 0x18, 0x1b, 0x20300000000003, 0x89fffff)
	/Users/zchee/sdk/go1.15.5/src/runtime/mbitmap.go:416 +0xb5 fp=0x70000d27de30 sp=0x70000d27dde0 pc=0x1018455
runtime.scanobject(0xc000103140, 0xc000037698)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgcmark.go:1385 +0x17c fp=0x70000d27dec0 sp=0x70000d27de30 pc=0x102487c
runtime.gcDrain(0xc000037698, 0x2)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgcmark.go:1143 +0x225 fp=0x70000d27df18 sp=0x70000d27dec0 pc=0x1024165
runtime.gcBgMarkWorker.func2()
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1977 +0xef fp=0x70000d27df58 sp=0x70000d27df18 pc=0x106d06f
runtime.systemstack(0x70000d27df70)
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:370 +0x66 fp=0x70000d27df60 sp=0x70000d27df58 pc=0x10742c6
runtime.mstart()
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:1116 fp=0x70000d27df68 sp=0x70000d27df60 pc=0x1041ee0

goroutine 108 [GC worker (idle)]:
runtime.systemstack_switch()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:330 fp=0xc00005ef58 sp=0xc00005ef50 pc=0x1074240
runtime.gcBgMarkWorker(0xc000036000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1945 +0x1eb fp=0xc00005efd8 sp=0xc00005ef58 pc=0x1020bcb
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00005efe0 sp=0xc00005efd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 1 [chan receive]:
runtime.gopark(0x12c47f8, 0xc00039e0b8, 0xc00013170e, 0x2)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000135788 sp=0xc000135758 pc=0x103f915
runtime.chanrecv(0xc00039e060, 0xc00013588e, 0xc000000101, 0x111e768)
	/Users/zchee/sdk/go1.15.5/src/runtime/chan.go:577 +0x286 fp=0xc000135818 sp=0xc000135788 pc=0x10069c6
runtime.chanrecv1(0xc00039e060, 0xc00013588e)
	/Users/zchee/sdk/go1.15.5/src/runtime/chan.go:439 +0x2b fp=0xc000135848 sp=0xc000135818 pc=0x100672b
testing.(*T).Run(0xc000382300, 0x12b2678, 0x10, 0x12c4578, 0x5fbb4900)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1169 +0x676 fp=0xc000135980 sp=0xc000135848 pc=0x111e796
testing.runTests.func1(0xc000104180)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1439 +0xde fp=0xc000135a20 sp=0xc000135980 pc=0x112553e
testing.tRunner(0xc000104180, 0xc000135c00)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1123 +0x1a3 fp=0xc000135b18 sp=0xc000135a20 pc=0x111e0a3
testing.runTests(0xc00011aa80, 0x13d4de0, 0x34, 0x34, 0xbfe6f0bf02c532b0, 0x8bb2d532a3, 0x13da8c0, 0xc000130100)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1437 +0x465 fp=0xc000135c30 sp=0xc000135b18 pc=0x1120c85
testing.(*M).Run(0xc00016c200, 0x0)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1345 +0x507 fp=0xc000135f08 sp=0xc000135c30 pc=0x111f267
main.main()
	_testmain.go:175 +0xc5 fp=0xc000135f88 sp=0xc000135f08 pc=0x1259665
runtime.main()
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:204 +0x1cf fp=0xc000135fe0 sp=0xc000135f88 pc=0x103f4ef
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000135fe8 sp=0xc000135fe0 pc=0x1075e61

goroutine 2 [force gc (idle)]:
runtime.gopark(0x12c4a30, 0x13da4c0, 0x13d1411, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000062f88 sp=0xc000062f58 pc=0x103f915
runtime.goparkunlock(0x13da4c0, 0x1411, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc000062fb8 sp=0xc000062f88 pc=0x103f9d3
runtime.forcegchelper()
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:255 +0xc5 fp=0xc000062fe0 sp=0xc000062fb8 pc=0x103f785
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000062fe8 sp=0xc000062fe0 pc=0x1075e61
created by runtime.init.6
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:243 +0x35

goroutine 3 [GC sweep wait]:
runtime.gopark(0x12c4a30, 0x13da620, 0x102140c, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000063780 sp=0xc000063750 pc=0x103f915
runtime.goparkunlock(0x13da620, 0x12e140c, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc0000637b0 sp=0xc000063780 pc=0x103f9d3
runtime.bgsweep(0xc0000244d0)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgcsweep.go:163 +0xa8 fp=0xc0000637d8 sp=0xc0000637b0 pc=0x1028268
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000637e0 sp=0xc0000637d8 pc=0x1075e61
created by runtime.gcenable
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:217 +0x5c

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x12c4a30, 0x13da800, 0x13d140d, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000063f50 sp=0xc000063f20 pc=0x103f915
runtime.goparkunlock(0x13da800, 0x12e140d, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc000063f80 sp=0xc000063f50 pc=0x103f9d3
runtime.bgscavenge(0xc0000244d0)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgcscavenge.go:314 +0x2a5 fp=0xc000063fd8 sp=0xc000063f80 pc=0x10262e5
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000063fe0 sp=0xc000063fd8 pc=0x1075e61
created by runtime.gcenable
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:218 +0x7e

goroutine 17 [finalizer wait]:
runtime.gopark(0x12c4a30, 0x140a2c8, 0x1401410, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc00005e728 sp=0xc00005e6f8 pc=0x103f915
runtime.goparkunlock(0x140a2c8, 0x1410, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc00005e758 sp=0xc00005e728 pc=0x103f9d3
runtime.runfinq()
	/Users/zchee/sdk/go1.15.5/src/runtime/mfinal.go:175 +0x96 fp=0xc00005e7e0 sp=0xc00005e758 pc=0x101d156
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00005e7e8 sp=0xc00005e7e0 pc=0x1075e61
created by runtime.createfing
	/Users/zchee/sdk/go1.15.5/src/runtime/mfinal.go:156 +0x65

goroutine 109 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0002fae10, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc00005f758 sp=0xc00005f728 pc=0x103f915
runtime.gcBgMarkWorker(0xc000042800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc00005f7d8 sp=0xc00005f758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00005f7e0 sp=0xc00005f7d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 110 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc00001a260, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc00005ff58 sp=0xc00005ff28 pc=0x103f915
runtime.gcBgMarkWorker(0xc000045000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc00005ffd8 sp=0xc00005ff58 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00005ffe0 sp=0xc00005ffd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 111 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc00001a280, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000060758 sp=0xc000060728 pc=0x103f915
runtime.gcBgMarkWorker(0xc00004c800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000607d8 sp=0xc000060758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000607e0 sp=0xc0000607d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 5 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc00001a250, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000064758 sp=0xc000064728 pc=0x103f915
runtime.gcBgMarkWorker(0xc000038800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000647d8 sp=0xc000064758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000647e0 sp=0xc0000647d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 6 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac000, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000064f58 sp=0xc000064f28 pc=0x103f915
runtime.gcBgMarkWorker(0xc00003b000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc000064fd8 sp=0xc000064f58 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000064fe0 sp=0xc000064fd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 113 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac010, 0xc000091418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000062758 sp=0xc000062728 pc=0x103f915
runtime.gcBgMarkWorker(0xc00003d800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000627d8 sp=0xc000062758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000627e0 sp=0xc0000627d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 114 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0002fae00, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0000b2758 sp=0xc0000b2728 pc=0x103f915
runtime.gcBgMarkWorker(0xc000040000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000b27d8 sp=0xc0000b2758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b27e0 sp=0xc0000b27d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 115 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac020, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0000b2f58 sp=0xc0000b2f28 pc=0x103f915
runtime.gcBgMarkWorker(0xc000047800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000b2fd8 sp=0xc0000b2f58 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b2fe0 sp=0xc0000b2fd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 116 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc00001a270, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0000b3758 sp=0xc0000b3728 pc=0x103f915
runtime.gcBgMarkWorker(0xc00004a000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000b37d8 sp=0xc0000b3758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b37e0 sp=0xc0000b37d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 117 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac030, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0000b3f58 sp=0xc0000b3f28 pc=0x103f915
runtime.gcBgMarkWorker(0xc00004f000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000b3fd8 sp=0xc0000b3f58 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b3fe0 sp=0xc0000b3fd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 118 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac040, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0000b4758 sp=0xc0000b4728 pc=0x103f915
runtime.gcBgMarkWorker(0xc000051800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000b47d8 sp=0xc0000b4758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000b47e0 sp=0xc0000b47d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 7 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac050, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000065758 sp=0xc000065728 pc=0x103f915
runtime.gcBgMarkWorker(0xc000054000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000657d8 sp=0xc000065758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000657e0 sp=0xc0000657d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 112 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0002fae20, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000060f58 sp=0xc000060f28 pc=0x103f915
runtime.gcBgMarkWorker(0xc000056800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc000060fd8 sp=0xc000060f58 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000060fe0 sp=0xc000060fd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 129 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0000ac060, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000061758 sp=0xc000061728 pc=0x103f915
runtime.gcBgMarkWorker(0xc000059000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc0000617d8 sp=0xc000061758 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000617e0 sp=0xc0000617d8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 130 [GC worker (idle)]:
runtime.gopark(0x12c48a0, 0xc0002fae30, 0x1418, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000061f58 sp=0xc000061f28 pc=0x103f915
runtime.gcBgMarkWorker(0xc00005b800)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1891 +0x11f fp=0xc000061fd8 sp=0xc000061f58 pc=0x1020aff
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000061fe0 sp=0xc000061fd8 pc=0x1075e61
created by runtime.gcBgMarkStartWorkers
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:1839 +0x77

goroutine 145 [chan receive]:
runtime.gopark(0x12c47f8, 0xc00039e178, 0xc0003a170e, 0x2)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0003a6ca8 sp=0xc0003a6c78 pc=0x103f915
runtime.chanrecv(0xc00039e120, 0xc0003a6dae, 0xc000382401, 0x111e768)
	/Users/zchee/sdk/go1.15.5/src/runtime/chan.go:577 +0x286 fp=0xc0003a6d38 sp=0xc0003a6ca8 pc=0x10069c6
runtime.chanrecv1(0xc00039e120, 0xc0003a6dae)
	/Users/zchee/sdk/go1.15.5/src/runtime/chan.go:439 +0x2b fp=0xc0003a6d68 sp=0xc0003a6d38 pc=0x100672b
testing.(*T).Run(0xc000382600, 0x12afb4b, 0x7, 0x12c4568, 0x0)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1169 +0x676 fp=0xc0003a6ea0 sp=0xc0003a6d68 pc=0x111e796
github.com/goccy/go-json_test.Test_MarshalJSON(0xc000382300)
	/Users/zchee/go/src/github.com/goccy/go-json/encode_test.go:419 +0x4c fp=0xc0003a6ed8 sp=0xc0003a6ea0 pc=0x122108c
testing.tRunner(0xc000382300, 0x12c4578)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1123 +0x1a3 fp=0xc0003a6fd0 sp=0xc0003a6ed8 pc=0x111e0a3
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0003a6fd8 sp=0xc0003a6fd0 pc=0x1075e61
created by testing.(*T).Run
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1168 +0x648

goroutine 146 [runnable]:
runtime.newobject(0x1286140, 0xc0003b6000)
	/Users/zchee/sdk/go1.15.5/src/runtime/malloc.go:1194 +0x51 fp=0xc0003a79d0 sp=0xc0003a79c8 pc=0x100ef71
github.com/goccy/go-json.(*Encoder).encode(0xc00016b340, 0x127aa20, 0xc0003a7e4f, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/encode.go:219 +0x568 fp=0xc0003a7b50 sp=0xc0003a79d0 pc=0x11946a8
github.com/goccy/go-json.(*Encoder).encodeForMarshal(0xc00016b340, 0x127aa20, 0xc0003a7e4f, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/encode.go:151 +0x7f fp=0xc0003a7c60 sp=0xc0003a7b50 pc=0x1193dbf
github.com/goccy/go-json.MarshalWithOption(0x127aa20, 0xc0003a7e4f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/json.go:169 +0x1cf fp=0xc0003a7d60 sp=0xc0003a7c60 pc=0x120f14f
github.com/goccy/go-json.Marshal(0x127aa20, 0xc0003a7e4f, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/json.go:157 +0x99 fp=0xc0003a7e10 sp=0xc0003a7d60 pc=0x120ee99
github.com/goccy/go-json_test.Test_MarshalJSON.func1(0xc000382600)
	/Users/zchee/go/src/github.com/goccy/go-json/encode_test.go:420 +0x77 fp=0xc0003a7ed8 sp=0xc0003a7e10 pc=0x1248477
testing.tRunner(0xc000382600, 0x12c4568)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1123 +0x1a3 fp=0xc0003a7fd0 sp=0xc0003a7ed8 pc=0x111e0a3
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0003a7fd8 sp=0xc0003a7fd0 pc=0x1075e61
created by testing.(*T).Run
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1168 +0x648
FAIL	github.com/goccy/go-json	0.043s
FAIL
$ GOGC=1 go1.15.5 test -v -race -count 1 -run=. -gcflags='all=-N -l' .
.
.
.
=== RUN   TestMarshalAllValue
runtime: pointer 0xc0001edc30 to unallocated span span.base()=0xc0001e6000 span.limit=0xc0001ee000 span.state=0
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

goroutine 62 [running]:
runtime.throw(0x14533e4, 0x3e)
	/Users/zchee/sdk/go1.15.5/src/runtime/panic.go:1116 +0x72 fp=0xc000289928 sp=0xc0002898f8 pc=0x107e432
runtime.badPointer(0x22c1fe8, 0xc0001edc30, 0x0, 0x0)
	/Users/zchee/sdk/go1.15.5/src/runtime/mbitmap.go:380 +0x255 fp=0xc000289970 sp=0xc000289928 pc=0x1059a75
runtime.findObject(0xc0001edc30, 0x0, 0x0, 0x14, 0x117297c, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/mbitmap.go:416 +0xb5 fp=0xc0002899c0 sp=0xc000289970 pc=0x1059b55
runtime.checkptrBase(0xc0001edc30, 0xc000289a78)
	/Users/zchee/sdk/go1.15.5/src/runtime/checkptr.go:68 +0x4f fp=0xc000289a00 sp=0xc0002899c0 pc=0x104820f
runtime.checkptrAlignment(0xc0001edc30, 0x13fd620, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/checkptr.go:19 +0x73 fp=0xc000289a38 sp=0xc000289a00 pc=0x1048033
reflect.Value.IsNil(0x1404300, 0xc0001edc30, 0x94, 0xc0001edc00)
	/Users/zchee/sdk/go1.15.5/src/reflect/value.go:1084 +0x26d fp=0xc000289b08 sp=0xc000289a38 pc=0x116e2ad
github.com/goccy/go-json.(*Encoder).run(0xc0001272d0, 0xc00020cde0, 0xc00022ba40, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/encode_vm.go:221 +0x89b fp=0xc00029efe8 sp=0xc000289b08 pc=0x12f21fb
github.com/goccy/go-json.(*Encoder).encode(0xc0001272d0, 0x143f280, 0xc00029fa38, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/encode.go:239 +0xc4a fp=0xc00029f338 sp=0xc00029efe8 pc=0x12ad34a
github.com/goccy/go-json.(*Encoder).encodeForMarshal(0xc0001272d0, 0x143f280, 0xc0000cfa38, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/encode.go:151 +0xb5 fp=0xc00029f4d0 sp=0xc00029f338 pc=0x12ac275
github.com/goccy/go-json.MarshalWithOption(0x143f280, 0xc0000cfa38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/json.go:169 +0x265 fp=0xc00029f628 sp=0xc00029f4d0 pc=0x136d145
github.com/goccy/go-json.Marshal(0x143f280, 0xc000072a38, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/zchee/go/src/github.com/goccy/go-json/json.go:157 +0xe5 fp=0xc00029f708 sp=0xc00029f628 pc=0x136cde5
github.com/goccy/go-json_test.TestMarshalAllValue(0xc0001c0f00)
	/Users/zchee/go/src/github.com/goccy/go-json/decode_test.go:1689 +0xe5 fp=0xc00029fe78 sp=0xc00029f708 pc=0x1386445
testing.tRunner(0xc0001c0f00, 0x14558a8)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1123 +0x2a5 fp=0xc00029ffd0 sp=0xc00029fe78 pc=0x11eb305
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00029ffd8 sp=0xc00029ffd0 pc=0x10b99a1
created by testing.(*T).Run
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1168 +0xb07

goroutine 1 [chan receive]:
runtime.gopark(0x1455ea0, 0xc0001d0478, 0x11e170e, 0x2)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc0000f5290 sp=0xc0000f5260 pc=0x1081095
runtime.chanrecv(0xc0001d0420, 0xc0000f5392, 0xc000000101, 0x11ebee7)
	/Users/zchee/sdk/go1.15.5/src/runtime/chan.go:577 +0x246 fp=0xc0000f5320 sp=0xc0000f5290 pc=0x10475a6
runtime.chanrecv1(0xc0001d0420, 0xc0000f5392)
	/Users/zchee/sdk/go1.15.5/src/runtime/chan.go:439 +0x2b fp=0xc0000f5350 sp=0xc0000f5320 pc=0x104734b
testing.(*T).Run(0xc0001c0f00, 0x1444c67, 0x13, 0x14558a8, 0x315f500c5800)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1169 +0xb68 fp=0xc0000f55d0 sp=0xc0000f5350 pc=0x11ebf48
testing.runTests.func1(0xc00009aa80)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1439 +0x186 fp=0xc0000f56b0 sp=0xc0000f55d0 pc=0x11f7a66
testing.tRunner(0xc00009aa80, 0xc0000f5a10)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1123 +0x2a5 fp=0xc0000f5808 sp=0xc0000f56b0 pc=0x11eb305
testing.runTests(0xc0000dca80, 0x1738860, 0x34, 0x34, 0xbfe6f01e4f6a6170, 0x8bb2ee9638, 0x173e320, 0xc0000c0100)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1437 +0x7f1 fp=0xc0000f5a40 sp=0xc0000f5808 pc=0x11efc51
testing.(*M).Run(0xc000128200, 0x0)
	/Users/zchee/sdk/go1.15.5/src/testing/testing.go:1345 +0x905 fp=0xc0000f5e90 sp=0xc0000f5a40 pc=0x11ed305
main.main()
	_testmain.go:175 +0x1bd fp=0xc0000f5f88 sp=0xc0000f5e90 pc=0x13e269d
runtime.main()
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:204 +0x1cf fp=0xc0000f5fe0 sp=0xc0000f5f88 pc=0x1080c6f
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000f5fe8 sp=0xc0000f5fe0 pc=0x10b99a1

goroutine 2 [force gc (idle)]:
runtime.gopark(0x1456190, 0x173df10, 0x1731411, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000064f88 sp=0xc000064f58 pc=0x1081095
runtime.goparkunlock(0x173df10, 0x1411, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc000064fb8 sp=0xc000064f88 pc=0x1081153
runtime.forcegchelper()
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:255 +0xc5 fp=0xc000064fe0 sp=0xc000064fb8 pc=0x1080f05
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000064fe8 sp=0xc000064fe0 pc=0x10b99a1
created by runtime.init.6
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:243 +0x35

goroutine 18 [GC sweep wait]:
runtime.gopark(0x1456190, 0x173e080, 0x106140c, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000060780 sp=0xc000060750 pc=0x1081095
runtime.goparkunlock(0x173e080, 0x15f140c, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc0000607b0 sp=0xc000060780 pc=0x1081153
runtime.bgsweep(0xc0000a6000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgcsweep.go:163 +0xa8 fp=0xc0000607d8 sp=0xc0000607b0 pc=0x1069968
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000607e0 sp=0xc0000607d8 pc=0x10b99a1
created by runtime.gcenable
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:217 +0x5c

goroutine 19 [GC scavenge wait]:
runtime.gopark(0x1456190, 0x173e260, 0x106140d, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000060f50 sp=0xc000060f20 pc=0x1081095
runtime.goparkunlock(0x173e260, 0x15f140d, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc000060f80 sp=0xc000060f50 pc=0x1081153
runtime.bgscavenge(0xc0000a6000)
	/Users/zchee/sdk/go1.15.5/src/runtime/mgcscavenge.go:265 +0xdc fp=0xc000060fd8 sp=0xc000060f80 pc=0x106781c
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000060fe0 sp=0xc000060fd8 pc=0x10b99a1
created by runtime.gcenable
	/Users/zchee/sdk/go1.15.5/src/runtime/mgc.go:218 +0x7e

goroutine 20 [finalizer wait]:
runtime.gopark(0x1456190, 0x176dd28, 0x1761410, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:306 +0xd5 fp=0xc000064728 sp=0xc0000646f8 pc=0x1081095
runtime.goparkunlock(0x176dd28, 0x1711410, 0x1)
	/Users/zchee/sdk/go1.15.5/src/runtime/proc.go:312 +0x53 fp=0xc000064758 sp=0xc000064728 pc=0x1081153
runtime.runfinq()
	/Users/zchee/sdk/go1.15.5/src/runtime/mfinal.go:175 +0x96 fp=0xc0000647e0 sp=0xc000064758 pc=0x105e856
runtime.goexit()
	/Users/zchee/sdk/go1.15.5/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000647e8 sp=0xc0000647e0 pc=0x10b99a1
created by runtime.createfing
	/Users/zchee/sdk/go1.15.5/src/runtime/mfinal.go:156 +0x65
FAIL	github.com/goccy/go-json	0.067s
FAIL

There are two workarounds, but both will increase allocation.

diff --git a/encode.go b/encode.go
index ca1cab1..a3ab000 100644
--- a/encode.go
+++ b/encode.go
@@ -183,6 +183,7 @@ func (e *Encoder) encode(v interface{}) error {
 			code = codeSet.code
 		}
 		ctx := codeSet.ctx.Get().(*encodeRuntimeContext)
+		ctx.keepRefs = append(ctx.keepRefs, header.ptr)
 		p := uintptr(header.ptr)
 		ctx.init(p)
 		err := e.run(ctx, code)
@@ -227,6 +228,7 @@ func (e *Encoder) encode(v interface{}) error {
 	cachedOpcode.set(typeptr, codeSet)
 	p := uintptr(header.ptr)
 	ctx := codeSet.ctx.Get().(*encodeRuntimeContext)
+	ctx.keepRefs = append(ctx.keepRefs, header.ptr)
 	ctx.init(p)
 
 	var c *opcode
diff --git a/encode.go b/encode.go
index ca1cab1..513709f 100644
--- a/encode.go
+++ b/encode.go
@@ -183,7 +183,7 @@ func (e *Encoder) encode(v interface{}) error {
 			code = codeSet.code
 		}
 		ctx := codeSet.ctx.Get().(*encodeRuntimeContext)
-		p := uintptr(header.ptr)
+		p := header.ptr
 		ctx.init(p)
 		err := e.run(ctx, code)
 		codeSet.ctx.Put(ctx)
@@ -218,14 +218,14 @@ func (e *Encoder) encode(v interface{}) error {
 		ctx: sync.Pool{
 			New: func() interface{} {
 				return &encodeRuntimeContext{
-					ptrs:     make([]uintptr, codeLength),
+					ptrs:     make([]unsafe.Pointer, codeLength),
 					keepRefs: make([]unsafe.Pointer, 8),
 				}
 			},
 		},
 	}
 	cachedOpcode.set(typeptr, codeSet)
-	p := uintptr(header.ptr)
+	p := header.ptr
 	ctx := codeSet.ctx.Get().(*encodeRuntimeContext)
 	ctx.init(p)
 
diff --git a/encode_context.go b/encode_context.go
index 7a241ff..30b3d44 100644
--- a/encode_context.go
+++ b/encode_context.go
@@ -84,11 +84,11 @@ func (c *encodeCompileContext) decPtrIndex() {
 }
 
 type encodeRuntimeContext struct {
-	ptrs     []uintptr
+	ptrs     []unsafe.Pointer
 	keepRefs []unsafe.Pointer
 }
 
-func (c *encodeRuntimeContext) init(p uintptr) {
+func (c *encodeRuntimeContext) init(p unsafe.Pointer) {
 	c.ptrs[0] = p
 	c.keepRefs = c.keepRefs[:0]
 }
diff --git a/encode_vm.go b/encode_vm.go
index 2a83ca0..127f5e5 100644
--- a/encode_vm.go
+++ b/encode_vm.go
@@ -267,7 +267,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, code *opcode) error {
 
 			newLen := offsetNum + totalLength + nextTotalLength
 			if curlen < newLen {
-				ctx.ptrs = append(ctx.ptrs, make([]uintptr, newLen-curlen)...)
+				ctx.ptrs = append(ctx.ptrs, make([]unsafe.Pointer, newLen-curlen)...)
 			}
 			ctxptr = ctx.ptr() + ptrOffset // assign new ctxptr
 
@@ -344,7 +344,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, code *opcode) error {
 
 			newLen := offsetNum + totalLength + nextTotalLength
 			if curlen < newLen {
-				ctx.ptrs = append(ctx.ptrs, make([]uintptr, newLen-curlen)...)
+				ctx.ptrs = append(ctx.ptrs, make([]unsafe.Pointer, newLen-curlen)...)
 			}
 			ctxptr = ctx.ptr() + ptrOffset // assign new ctxptr
 
@@ -1015,7 +1015,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, code *opcode) error {
 
 			newLen := offsetNum + totalLength + nextTotalLength
 			if curlen < newLen {
-				ctx.ptrs = append(ctx.ptrs, make([]uintptr, newLen-curlen)...)
+				ctx.ptrs = append(ctx.ptrs, make([]unsafe.Pointer, newLen-curlen)...)
 			}
 			ctxptr = ctx.ptr() + ptrOffset // assign new ctxptr
 

Run

$ cd benchmarks && go1.15.5 mod vendor && go1.15.5 test -v -run='^$' -count 1 -benchmem -bench='Benchmark_Encode_MediumStruct_GoJson' .

in 73ba041:

goos: darwin
goarch: amd64
pkg: benchmark
Benchmark_Encode_MediumStruct_GoJson
Benchmark_Encode_MediumStruct_GoJson-16    	 2105785	       572 ns/op	     320 B/op	       1 allocs/op
PASS
ok  	benchmark	2.016s

patched 1:

goos: darwin
goarch: amd64
pkg: benchmark
Benchmark_Encode_MediumStruct_GoJson
Benchmark_Encode_MediumStruct_GoJson-16    	 1255018	       957 ns/op	     632 B/op	      15 allocs/op
PASS
ok  	benchmark	2.210s

patched 2:

goos: darwin
goarch: amd64
pkg: benchmark
Benchmark_Encode_MediumStruct_GoJson
Benchmark_Encode_MediumStruct_GoJson-16    	 1263481	       941 ns/op	     632 B/op	      15 allocs/op
PASS
ok  	benchmark	2.446s

Unexpectedly long integers lead to panic in Unmarshal.

When given unexpectedly long integers, go-json v0.4.11's Unmarshal() panics with "panic: runtime error: index out of range".

Reproduce with:

package main

import (
        "fmt"
        // "encoding/json"

        json "github.com/goccy/go-json"
)

type Foo struct {
        A int
        B uint
}

func main() {
        input := []byte(`{"a":000000000000000000000}`)
        // input := []byte(`{"b":000000000000000000000}`)
        foo := &Foo{}
        err := json.Unmarshal(input, foo)
        fmt.Println(foo, err)
}

Depending on which input you use, that panics at either decode_int.go:54 or decode_uint.go:45 because pow10i64 or pow10u64 only have 19 or 20 values respectively. There's a missing length check here; the integer should be rejected if it is too long.

encoding/json also rejects leading zeros as invalid. If the first character of an integer is 0, it considers any characters after that to be invalid input.

Handling of embedded fields is different from "encoding/json"

For example code

package main

import (
	"os"

	"github.com/goccy/go-json"
)

type Foo struct {
	ID string `json:"id"`
}

type Bar struct {
	Foo
	Name string `json:"name"`
}

func main() {
	bar := new(Bar)
	bar.ID = "id_hoge"
	bar.Name = "name_fuga"
	json.NewEncoder(os.Stdout).Encode(bar)
}

Result

  • goccy/go-json
{"Foo":{"id":"id_hoge"},"name":"name_fuga"}
  • encoding/json
{"id":"id_hoge","name":"name_fuga"}

MarshalIndent returns empty string

Another incompatibility with "encoding/json":

package main

import (
	gojson "encoding/json"
	"fmt"
	"github.com/goccy/go-json"
)

type ReportData struct {
	Columns []string   `json:"columns"`
	Rows1   [][]string `json:"rows1"`
	Rows2   [][]string `json:"rows2"`
}

func (r *ReportData) Dump() string {
	d, _ := json.MarshalIndent(r, "", "  ")
	s := string(d)
	return s
}

func (r *ReportData) GoDump() string {
	d, _ := gojson.MarshalIndent(r, "", "  ")
	s := string(d)
	return s
}

func main() {
	r := ReportData{Columns: []string{"1", "2", "3"}}
	fmt.Println("---")
	fmt.Println(r.Dump())
	fmt.Println("---")
	fmt.Println(r.GoDump())
}

Prints:

---

---
{
  "columns": [
    "1",
    "2",
    "3"
  ],
  "rows1": null,
  "rows2": null
}

Panic with invalid data

Found in go-fuzz
https://github.com/dvyukov/go-fuzz

Test code

package json_test

import (
	"testing"

	"github.com/goccy/go-json"
)

func TestPanic(t *testing.T) {
	data := "[\"\\"
	var i interface{}
	json.Unmarshal([]byte(data), &i)
}

Output

=== RUN   TestPanic
--- FAIL: TestPanic (0.00s)
panic: runtime error: index out of range [4] with length 4 [recovered]
        panic: runtime error: index out of range [4] with length 4

goroutine 19 [running]:
testing.tRunner.func1.1(0xa087c0, 0xc0001542c0)
        /home/linuxbrew/.linuxbrew/Cellar/go/1.15.7/libexec/src/testing/testing.go:1072 +0x30d
testing.tRunner.func1(0xc000102900)
        /home/linuxbrew/.linuxbrew/Cellar/go/1.15.7/libexec/src/testing/testing.go:1075 +0x41a
panic(0xa087c0, 0xc0001542c0)
        /home/linuxbrew/.linuxbrew/Cellar/go/1.15.7/libexec/src/runtime/panic.go:969 +0x1b9
github.com/goccy/go-json.(*interfaceDecoder).decode(0xc00011da70, 0xc0001244f0, 0x4, 0x4, 0x1, 0xc000138d00, 0x7f5b2a9bdaa8, 0xdc2b80, 0x0)
        /home/heijo/ghq/github.com/goccy/go-json/decode_interface.go:218 +0x1431
github.com/goccy/go-json.(*sliceDecoder).decode(0xc00017f340, 0xc0001244f0, 0x4, 0x4, 0x0, 0xc000187d78, 0x0, 0x0, 0xc00017f340)
        /home/heijo/ghq/github.com/goccy/go-json/decode_slice.go:197 +0x518
github.com/goccy/go-json.(*interfaceDecoder).decode(0xc00011da10, 0xc0001244f0, 0x4, 0x4, 0x0, 0xc0001194f0, 0x10, 0xdc2b80, 0x0)
        /home/heijo/ghq/github.com/goccy/go-json/decode_interface.go:204 +0x574
github.com/goccy/go-json.(*Decoder).decode(0xc00005c758, 0xc0001244f0, 0x4, 0x4, 0xc00006ef08, 0xc0001244f0, 0xc0001244f0)
        /home/heijo/ghq/github.com/goccy/go-json/decode.go:103 +0x106
github.com/goccy/go-json.(*Decoder).decodeForUnmarshal(0xc00005c758, 0xc0001244f0, 0x4, 0x4, 0x96cda0, 0xc0001194f0, 0xc00005c748, 0x46da5b)
        /home/heijo/ghq/github.com/goccy/go-json/decode.go:112 +0x65
github.com/goccy/go-json.Unmarshal(...)
        /home/heijo/ghq/github.com/goccy/go-json/json.go:301
github.com/goccy/go-json_test.TestPanic(0xc000102900)
        /home/heijo/ghq/github.com/goccy/go-json/bugs_test.go:12 +0xeb
testing.tRunner(0xc000102900, 0xa75ea8)
        /home/linuxbrew/.linuxbrew/Cellar/go/1.15.7/libexec/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
        /home/linuxbrew/.linuxbrew/Cellar/go/1.15.7/libexec/src/testing/testing.go:1168 +0x2b3
FAIL    github.com/goccy/go-json        0.006s
FAIL

Error message is unclear

"failed to handle opcode. doesn't implement %s"

ใ“ใฎใƒกใƒƒใ‚ปใƒผใ‚ธใฏ่‹ฑ่ชžใง่ชญใ‚€ใจใกใ‚‡ใฃใจๆ„ๅ‘ณใŒ้€šใ‚Šใฅใ‚‰ใ„ใจๆ€ใ„ใพใ™ใ€‚

ใพใšๅคšๅˆ†่จ€ใ„ใŸใ„ใฎใฏใ€Œใ“ใฎใ‚ชใƒšใ‚ณใƒผใƒ‰ใฏๅฎŸ่ฃ…ใ•ใ‚Œใฆใ„ใชใ„ใ€ใ ใจๆ€ใ†ใ‚“ใงใ™ใ‘ใฉใ€ไธป่ชžใŒๆŠœใ‘ใฆใ„ใ‚‹ใŸใ‚type ใŒinterfaceใ‚’implementใ™ใ‚‹ใฎimplementใชใฎใ‹ใ€ๅฎŸ่ฃ…ใ•ใ‚Œใฆใ„ใชใ„ใ€ใฎๅฎŸ่ฃ…ใชใฎใ‹ใ‚ˆใใ‚ใ‹ใ‚‰ใชใ„ใงใ™ใ€‚

ใŠใ™ใ™ใ‚ใฏ

opcode %s has not been implemented for %s

ใงใ€ไบŒใค็›ฎใฎ%sใซใฏๅฏพ่ฑกใฎใ‚ชใƒ–ใ‚ธใ‚งใ‚ฏใƒˆใชใ„ใ—ใƒ•ใ‚ฃใƒผใƒซใƒ‰ๅใŒ่กจ็คบใงใใ‚‹ใจๆœ€้ซ˜ใ ใจๆ€ใ„ใพใ™ใ€‚

ใพใŸใ€ๅŒใ˜ใƒกใƒƒใ‚ปใƒผใ‚ธใŒ4ใ‚ซๆ‰€ใซ็™ปๅ ดใ™ใ‚‹ใฎใ‚‚ใƒ‡ใƒใƒƒใ‚ฐใ‚’้›ฃใ—ใใ—ใฆใ„ใ‚‹ใจๆ€ใ†ใฎใงใ€ใใ‚Œใžใ‚Œใฎใƒกใƒƒใ‚ปใƒผใ‚ธใฎๆœ€ๅˆใซใ‚ณใƒณใƒ†ใ‚ญใ‚นใƒˆๅ›บๆœ‰ใฎใชใซใŒใ—ใ‹ใ‚’่ฟฝๅŠ ใ™ใ‚‹ใจใ„ใ„ใ‹ใจๆ€ใ„ใพใ™ใ€‚

encoder (escaped): opcode %s has not been implemented for %s

ใจใ‹ใ€‚

ไบŒใค็›ฎใฎ%sใ‚’็ซฏๆŠ˜ใ‚‹ใชใ‚‰

encoder (escaped): opcode %s has not been implemented

ใงใ‚‚ใ„ใ„ใ‹ใจๆ€ใ„ใพใ™ใ€‚

Panic when using a custom type with MarshalJSON() + `omitempty` + specific order of fields in a struct

The panic happens when:

  • There's a custom type with a MarshalJSON + there's an omitempty in the field + the field (Field2) has a value

The panic does not happen when:

  • Field2 is empty.
  • The order of Field1 and Field2 in the struct definition are interchanged (!)
package main

import (
	"fmt"

	gojson "github.com/goccy/go-json"
)

type NullStr string

type Test struct {
	Field1 string  `json:"field1"`
	Field2 NullStr `json:"field2,omitempty"`
}

func main() {

	b, err := gojson.Marshal(Test{
		Field1: "a",
		Field2: "b",
	})

	fmt.Println(string(b), err)
}

func (v *NullStr) MarshalJSON() ([]byte, error) {
	if *v == "" {
		return []byte("null"), nil
	}

	return []byte(*v), nil
}
$ go run main.go                                                                                                                                      
runtime: out of memory: cannot allocate 2317421039983788032-byte block (66781184 in use)
fatal error: out of memory

goroutine 1 [running]:
runtime.throw(0x55eca4, 0xd)
        /usr/local/go/src/runtime/panic.go:1117 +0x72 fp=0xc000414190 sp=0xc000414160 pc=0x4335f2
runtime.(*mcache).allocLarge(0x7fa7bf2fe108, 0x202922285b206000, 0x400100, 0x545180)
        /usr/local/go/src/runtime/mcache.go:226 +0x29e fp=0xc0004141e8 sp=0xc000414190 pc=0x4162be
runtime.mallocgc(0x202922285b206000, 0x0, 0x0, 0x538c36)
        /usr/local/go/src/runtime/malloc.go:1078 +0x925 fp=0xc000414270 sp=0xc0004141e8 pc=0x40d445
runtime.rawbyteslice(0x202922285b205020, 0x0, 0x0, 0x0)
        /usr/local/go/src/runtime/string.go:276 +0xb1 fp=0xc0004142b0 sp=0xc000414270 pc=0x44dc91
runtime.stringtoslicebyte(0x0, 0x40202b20736d6862, 0x202922285b205020, 0x545180, 0x545100, 0x7fa798632858)
        /usr/local/go/src/runtime/string.go:171 +0xbf fp=0xc0004142f8 sp=0xc0004142b0 pc=0x44d65f
main.(*NullStr).MarshalJSON(0x55d516, 0x545180, 0x55d516, 0x7fa798632858, 0x55d516, 0xc000404000)
        /code/go/my/go-json-benchmark/main.go:31 +0x90 fp=0xc000414338 sp=0xc0004142f8 pc=0x535ed0
github.com/goccy/go-json.encodeRunEscaped(0xc000406000, 0xc000404000, 0xe, 0x400, 0xc0000102f0, 0x1, 0x0, 0x0, 0x0, 0x0, ...)
        /code/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_escaped.go:5195 +0x3c9ef fp=0xc000415cc8 sp=0xc000414338 pc=0x52ed2f
github.com/goccy/go-json.encodeRunCode(0xc000406000, 0xc000404000, 0x0, 0x400, 0xc0000102f0, 0x1, 0x5352f7, 0x553d60, 0xc000406000, 0x8, ...)
        /code/go/pkg/mod/github.com/goccy/[email protected]/encode.go:276 +0x74 fp=0xc000415d30 sp=0xc000415cc8 pc=0x49fc34
github.com/goccy/go-json.encode(0xc000406000, 0x54a640, 0xc000026040, 0x1, 0xc000026040, 0x20, 0x20, 0x54a640, 0x6316e0)
        /code/go/pkg/mod/github.com/goccy/[email protected]/encode.go:205 +0x1df fp=0xc000415df8 sp=0xc000415d30 pc=0x49f8ff
github.com/goccy/go-json.marshal(0x54a640, 0xc000026040, 0x1, 0x40aadf, 0x54a640, 0xc000026040, 0xc000064f58, 0xc000026040)
        /code/go/pkg/mod/github.com/goccy/[email protected]/encode.go:131 +0x85 fp=0xc000415e80 sp=0xc000415df8 pc=0x49f5a5
github.com/goccy/go-json.MarshalWithOption(0x54a640, 0xc000026040, 0x0, 0x0, 0x0, 0x7fa7bf2fe108, 0x60, 0xc00001e060, 0xc000036748, 0x64a4a0)
        /code/go/pkg/mod/github.com/goccy/[email protected]/json.go:171 +0x76 fp=0xc000415ed8 sp=0xc000415e80 pc=0x5346f6
github.com/goccy/go-json.Marshal(...)
        /code/go/pkg/mod/github.com/goccy/[email protected]/json.go:157
main.main()
        /code/go/my/go-json-benchmark/main.go:18 +0xce fp=0xc000415f88 sp=0xc000415ed8 pc=0x535d4e
runtime.main()
        /usr/local/go/src/runtime/proc.go:225 +0x256 fp=0xc000415fe0 sp=0xc000415f88 pc=0x435e36
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000415fe8 sp=0xc000415fe0 pc=0x465041
exit status 2

race detected on v0.4.7

I have not really looked deep into it, but my most recent test showed the following. Please let me know if you need more info

==================
WARNING: DATA RACE
Write at 0x00c001f02080 by goroutine 19:
  github.com/goccy/go-json.(*RawMessage).UnmarshalJSON()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/json.go:336 +0x44
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*structDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:536 +0x9f5
  github.com/goccy/go-json.(*ptrDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:54 +0x325
  github.com/goccy/go-json.(*sliceDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_slice.go:117 +0xada
  github.com/goccy/go-json.(*structDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:536 +0x9f5
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.(*Message).UnmarshalJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/message.go:170 +0xee
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.parseJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:395 +0xcb
  github.com/lestrrat-go/jwx/jws.Parse()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:332 +0x16f
  github.com/lestrrat-go/jwx/jws.ParseReader()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:350 +0x7e9
  github.com/lestrrat-go/jwx/jws_test.TestEncode.func8()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:788 +0xe6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Previous read at 0x00c001f02080 by goroutine 20:
  github.com/lestrrat-go/jwx/jws.(*Message).UnmarshalJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/message.go:207 +0xfc4
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.parseJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:395 +0xcb
  github.com/lestrrat-go/jwx/jws.Parse()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:332 +0x16f
  github.com/lestrrat-go/jwx/jws.ParseReader()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:350 +0x7e9
  github.com/lestrrat-go/jwx/jws_test.TestEncode.func7()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:756 +0xe6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 19 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  github.com/lestrrat-go/jwx/jws_test.TestEncode()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:771 +0x1b4
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 20 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  github.com/lestrrat-go/jwx/jws_test.TestEncode()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:738 +0x185
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202
==================
==================
WARNING: DATA RACE
Write at 0x00c001f02098 by goroutine 19:
  github.com/goccy/go-json.(*stringDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_string.go:41 +0x156
  github.com/goccy/go-json.(*structDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:536 +0x9f5
  github.com/goccy/go-json.(*ptrDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:54 +0x325
  github.com/goccy/go-json.(*sliceDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_slice.go:117 +0xada
  github.com/goccy/go-json.(*structDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:536 +0x9f5
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.(*Message).UnmarshalJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/message.go:170 +0xee
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.parseJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:395 +0xcb
  github.com/lestrrat-go/jwx/jws.Parse()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:332 +0x16f
  github.com/lestrrat-go/jwx/jws.ParseReader()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:350 +0x7e9
  github.com/lestrrat-go/jwx/jws_test.TestEncode.func8()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:788 +0xe6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Previous read at 0x00c001f02098 by goroutine 20:
  github.com/lestrrat-go/jwx/jws.(*Message).UnmarshalJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/message.go:213 +0x965
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.parseJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:395 +0xcb
  github.com/lestrrat-go/jwx/jws.Parse()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:332 +0x16f
  github.com/lestrrat-go/jwx/jws.ParseReader()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:350 +0x7e9
  github.com/lestrrat-go/jwx/jws_test.TestEncode.func7()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:756 +0xe6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 19 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  github.com/lestrrat-go/jwx/jws_test.TestEncode()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:771 +0x1b4
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 20 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  github.com/lestrrat-go/jwx/jws_test.TestEncode()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:738 +0x185
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202
==================
==================
WARNING: DATA RACE
Write at 0x00c001f020a8 by goroutine 19:
  github.com/goccy/go-json.(*stringDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_string.go:41 +0x156
  github.com/goccy/go-json.(*structDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:536 +0x9f5
  github.com/goccy/go-json.(*ptrDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:54 +0x325
  github.com/goccy/go-json.(*sliceDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_slice.go:117 +0xada
  github.com/goccy/go-json.(*structDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:536 +0x9f5
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.(*Message).UnmarshalJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/message.go:170 +0xee
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.parseJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:395 +0xcb
  github.com/lestrrat-go/jwx/jws.Parse()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:332 +0x16f
  github.com/lestrrat-go/jwx/jws.ParseReader()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:350 +0x7e9
  github.com/lestrrat-go/jwx/jws_test.TestEncode.func8()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:788 +0xe6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Previous read at 0x00c001f020a8 by goroutine 20:
  github.com/lestrrat-go/jwx/jws.(*Message).UnmarshalJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/message.go:227 +0x544
  github.com/goccy/go-json.(*unmarshalJSONDecoder).decodeStream()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:45 +0x24e
  github.com/goccy/go-json.(*Decoder).Decode()
      /Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/decode.go:151 +0x1b1
  github.com/lestrrat-go/jwx/internal/json.Unmarshal()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/internal/json/json.go:25 +0x106
  github.com/lestrrat-go/jwx/jws.parseJSON()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:395 +0xcb
  github.com/lestrrat-go/jwx/jws.Parse()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:332 +0x16f
  github.com/lestrrat-go/jwx/jws.ParseReader()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws.go:350 +0x7e9
  github.com/lestrrat-go/jwx/jws_test.TestEncode.func7()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:756 +0xe6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 19 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  github.com/lestrrat-go/jwx/jws_test.TestEncode()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:771 +0x1b4
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 20 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  github.com/lestrrat-go/jwx/jws_test.TestEncode()
      /Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jws/jws_test.go:738 +0x185
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202
==================

Fails to parse valid file

I used the json.Valid function on this json file and it failed.

The JSON is known to be valid.

I picked a few more files from here and most of also failed but they are all valid.

Here's a test program I threw together.

I'm running Go 1.15 on a Mac

nil dereference panic is occured, when the structure has same type fields?

Inputting the code something like this, nil dereference panic is occurred.

package main

import (
	"os"

	"github.com/goccy/go-json"
)

type S0 struct {
	X S1 `json:"x"`
	Y S1 `json:"y"`
}

type S1 struct {
	Name string `json:"name"`
}

func main() {
	s := S0{X: S1{Name: "foo"}, Y: S1{Name: "bar"}}
	encoder := json.NewEncoder(os.Stdout)
	encoder.SetIndent("", "  ")
	encoder.Encode(&s)
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1 pc=0x10b164a]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1 pc=0x10b164a]

goroutine 1 [running]:
github.com/goccy/go-json.(*Encoder).encodeEscapedString(0xc0000bc000, 0x1, 0xc000099f98)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_string.go:226 +0x7a
github.com/goccy/go-json.(*Encoder).encodeString(0xc0000bc000, 0x1, 0xc000099f98)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode.go:271 +0x45
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6700, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:1002 +0xa38f
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6680, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6600, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6580, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6500, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6480, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6400, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6380, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6300, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6280, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6200, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6180, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6100, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6080, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c6000, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1f80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1f00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1e80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1e00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1d80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1d00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1c80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1c00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1b80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1b00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1a80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1a00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1980, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1900, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1880, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1800, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1780, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1700, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1680, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1600, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1580, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1500, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1480, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1400, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1380, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1300, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1280, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1200, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1180, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1100, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1080, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c1000, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0f80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0f00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0e80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0e00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0d80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0d00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0c80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0c00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0b80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0b00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0a80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0a00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0980, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0900, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0880, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0800, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0780, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0700, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0680, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0600, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0580, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0500, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0480, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0400, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0380, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0300, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0280, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0200, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0180, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0100, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0080, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000c0000, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abf80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abf00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abe80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abe00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abd80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abd00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abc80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abc00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abb80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000abb00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000aba80, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000aba00, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000ab980, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000ab900, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000ab880, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000ab800, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec
github.com/goccy/go-json.(*Encoder).run(0xc0000bc000, 0xc0000ab780, 0x4, 0x0)
        ~/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:465 +0x11cec

Weird behavior when swapping from encoding/json to github.com/goccy/go-json

% go version
go version go1.16beta1 darwin/arm64

In github.com/lestrrat-go/jwx (topic/v1.1.0-marshal-optimize branch, commit bc72347), if you just run some tests, it passes.

% make smoke
<snip>
PASS
ok  	github.com/lestrrat-go/jwx/examples	4.057s
ok  	github.com/lestrrat-go/jwx	(cached)
?   	github.com/lestrrat-go/jwx/cmd/jwx	[no test files]
<snip>

Now, apply the following patch

diff --git a/internal/json/json.go b/internal/json/json.go
index 0eaf063..f90e8bf 100644
--- a/internal/json/json.go
+++ b/internal/json/json.go
@@ -2,10 +2,10 @@ package json
 
 import (
        "bytes"
-       "encoding/json"
        "io"
        "sync"
 
+       "github.com/goccy/go-json"
        "github.com/lestrrat-go/jwx/internal/base64"
        "github.com/pkg/errors"
 )

Then run

make tidy   # runs go mod tidy where applicable

and then run some tests.

% make smoke
<snip>
--- FAIL: ExampleJWS_Message (0.00s)
got:
json: error calling MarshalJSON for type *jws.Message: failed to handle opcode. doesn't implement StructFieldOmitEmptyStringPtr
<snip>

Further more, run the following

cd jwk && go test

And then BOOOM

unexpected fault address 0x23a0000015fd4
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x2 addr=0x23a0000015fd4 pc=0x23a0000015fd4]

goroutine 23 [running]:
runtime.throw(0x105298293, 0x5)
	/usr/local/go/src/runtime/panic.go:1112 +0x54 fp=0x14000167e30 sp=0x14000167e00 pc=0x104ef5204
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:737 +0x230 fp=0x14000167e70 sp=0x14000167e30 pc=0x104f0c7f0
github.com/lestrrat-go/jwx/jwk_test.TestECDSA.func3(0x14000103380)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/ecdsa_test.go:189 +0x134 fp=0x14000167f70 sp=0x14000167e80 pc=0x10528b064
testing.tRunner(0x14000103380, 0x1053fb868)
	/usr/local/go/src/testing/testing.go:1194 +0xe0 fp=0x14000167fc0 sp=0x14000167f70 pc=0x104f9e4f0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0x14000167fc0 sp=0x14000167fc0 pc=0x104f2b634
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1239 +0x21c

goroutine 1 [chan receive]:
testing.(*T).Run(0x14000102a80, 0x1052994cb, 0x9, 0x1053fb888, 0x600998f7)
	/usr/local/go/src/testing/testing.go:1240 +0x238
testing.runTests.func1(0x14000102900)
	/usr/local/go/src/testing/testing.go:1512 +0x74
testing.tRunner(0x14000102900, 0x14000193da8)
	/usr/local/go/src/testing/testing.go:1194 +0xe0
testing.runTests(0x1400012c180, 0x1056310c0, 0x12, 0x12, 0xbffa84b3de79fc98, 0x8bb2dc144d, 0x105637340, 0x104f9609c)
	/usr/local/go/src/testing/testing.go:1510 +0x284
testing.(*M).Run(0x1400018a080, 0x0)
	/usr/local/go/src/testing/testing.go:1418 +0x1b4
main.main()
	_testmain.go:79 +0x14c

goroutine 19 [chan receive]:
testing.(*T).Run(0x14000103380, 0x1052a525d, 0x1d, 0x1053fb868, 0x2e3b599a98d01)
	/usr/local/go/src/testing/testing.go:1240 +0x238
github.com/lestrrat-go/jwx/jwk_test.TestECDSA(0x14000102a80)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/ecdsa_test.go:170 +0xa0
testing.tRunner(0x14000102a80, 0x1053fb888)
	/usr/local/go/src/testing/testing.go:1194 +0xe0
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1239 +0x21c
exit status 2
FAIL	github.com/lestrrat-go/jwx/jwk	0.392s

Panic when unmarshaling a complex structure

Branch migrared to go-json: https://github.com/swaggest/jsonschema-go/tree/try-goccy.

Reproducer.
package jsonschema_test

import (
	"testing"

	json "github.com/goccy/go-json"
	"github.com/swaggest/jsonschema-go"
)

func TestSchema_MarshalJSON_roundtrip(t *testing.T) {
	var (
		jsonValue = []byte(`{"$id":"cbbfff","$schema":"cdef","$ref":"aadce","$comment":"dc","title":"daecfe","description":"cddbd","readOnly":true,"examples":["accdf"],"multipleOf":9682.647,"maximum":8027.772,"exclusiveMaximum":3134.928,"minimum":928.915,"exclusiveMinimum":6923.534,"maxLength":5182,"minLength":8764,"pattern":"adeadb","additionalItems":{"$id":"cda","$schema":"bdc","$ref":"dbfee","$comment":"fcceaf","title":"fedacd","description":"ab","readOnly":true,"examples":["edc"],"multipleOf":4692.916,"maximum":9086.046,"exclusiveMaximum":962.626,"minimum":2936.848,"exclusiveMinimum":9033.798,"maxLength":2878,"minLength":1195,"pattern":"bffd","additionalItems":{"$id":"eae","$schema":"db","$ref":"bfdbc","$comment":"ec","title":"eb","description":"fffbce","readOnly":true,"examples":["dca"],"multipleOf":1400.521,"maximum":5149.376,"exclusiveMaximum":7924.243,"minimum":9446.003,"exclusiveMinimum":298.984,"maxLength":5866,"minLength":8831,"pattern":"bcf","items":{"$id":"fa","$schema":"abdfad","$ref":"aeab","$comment":"bafd","title":"eaceae","description":"cc","readOnly":true,"examples":["eadf"],"multipleOf":738.846,"maximum":1148.345,"exclusiveMaximum":7869.728,"minimum":9494.943,"exclusiveMinimum":641.609,"maxLength":4499,"minLength":3553,"pattern":"bcacc","additionalItems":{"$id":"fcadff","$schema":"eca","$ref":"bdb","$comment":"dfe","title":"cfdcf","description":"baf","readOnly":true,"examples":["dda"],"multipleOf":1920.369,"maximum":6968.485,"exclusiveMaximum":4643.651,"minimum":660.936,"exclusiveMinimum":2304.398,"maxLength":7555,"minLength":5082,"pattern":"de","items":[{"$id":"befdf","$schema":"dcba","$ref":"bffbb","$comment":"cdf","title":"caf","description":"eeacab","readOnly":true,"examples":["bd"],"multipleOf":2330.51,"maximum":7174.199,"exclusiveMaximum":8071.245,"minimum":6129.868,"exclusiveMinimum":3879.219,"maxLength":4269,"minLength":8635,"pattern":"cfcbcf","additionalItems":{"$id":"ce","$schema":"bb","$ref":"eabafb","$comment":"ab","title":"daac","description":"cba","readOnly":true,"examples":["df"],"multipleOf":1955.099,"maximum":9387.178,"exclusiveMaximum":5814.008,"minimum":3711.968,"exclusiveMinimum":9700.23,"maxLength":500,"minLength":8468,"pattern":"efc","items":{"ec":"babfe"},"bffb":"bdea"},"aaead":"ac"}],"abdb":"cccf"},"bed":"cec"},"efecaf":"fdeeb"},"afcfaf":"ec"},"items":{"$id":"eaeeaf","$schema":"ccb","$ref":"fdcbaf","$comment":"abcdaf","title":"ac","description":"dcefd","readOnly":true,"examples":["dfecaf"],"multipleOf":4595.993,"maximum":9479.754,"exclusiveMaximum":9613.211,"minimum":8271.328,"exclusiveMinimum":3342.518,"maxLength":150,"minLength":4721,"pattern":"dbc","additionalItems":{"$id":"fbd","$schema":"becee","$ref":"bceeab","$comment":"efefda","title":"ad","description":"dc","readOnly":true,"examples":["aadabb"],"multipleOf":2353.448,"maximum":8928.994,"exclusiveMaximum":8151.185,"minimum":5778.994,"exclusiveMinimum":5439.428,"maxLength":1840,"minLength":1913,"pattern":"eccf","items":{"$id":"eeacfa","$schema":"ffd","$ref":"cd","$comment":"afa","title":"fcac","description":"ddd","readOnly":true,"examples":["aceba"],"multipleOf":6980.874,"maximum":9005.385,"exclusiveMaximum":8644.93,"minimum":47.628,"exclusiveMinimum":3227.487,"maxLength":2642,"minLength":6708,"pattern":"bcacab","additionalItems":{"$id":"ae","$schema":"feb","$ref":"adfd","$comment":"efe","title":"ec","description":"dff","readOnly":true,"examples":["facf"],"multipleOf":2524.415,"maximum":2988.703,"exclusiveMaximum":8549.125,"minimum":5407.655,"exclusiveMinimum":5277.619,"maxLength":8599,"minLength":8022,"pattern":"eda","maxItems":443,"minItems":5190,"uniqueItems":true,"contains":{"$id":"cafacf","$schema":"eddbb","$ref":"aeccac","$comment":"cbe","title":"ef","description":"befe","readOnly":true,"examples":["dbfbf"],"multipleOf":1393.661,"maximum":9163.139,"exclusiveMaximum":5403.505,"minimum":9096.446,"exclusiveMinimum":4671.386,"maxLength":2571,"minLength":2187,"pattern":"cffaee","additionalItems":{"$id":"dcddce","$schema":"ebceba","$ref":"ce","$comment":"cdbcc","title":"ecabba","description":"ccfc","readOnly":true,"examples":["dfce"],"multipleOf":3930.01,"maximum":8729.351,"exclusiveMaximum":808.757,"minimum":8447.251,"exclusiveMinimum":3521.861,"maxLength":5384,"minLength":10,"pattern":"abcce","items":{"$id":"caee","$schema":"cbed","$ref":"edbe","$comment":"bddcd","title":"eb","description":"bbab","readOnly":true,"examples":["ddf"],"multipleOf":4461.549,"maximum":3003.183,"exclusiveMaximum":9680.159,"minimum":1430.915,"exclusiveMinimum":3596.243,"maxLength":9013,"pattern":"be","additionalItems":{"becfee":"aaab"},"fe":"da"},"ce":"bfcfa"},"af":"bfe"},"cf":"accb"},"aa":"dfba"},"ab":"ac"},"faceb":"cffd"},"maxItems":7876,"minItems":5111,"uniqueItems":true,"contains":{"$id":"effa","$schema":"bfd","$ref":"dde","$comment":"ecf","title":"fbffc","description":"ffde","readOnly":true,"examples":["df"],"multipleOf":7662.348,"maximum":7357.585,"exclusiveMaximum":3425.199,"minimum":9096.46,"exclusiveMinimum":8458.669,"maxLength":2774,"minLength":4288,"pattern":"caf","additionalItems":{"$id":"bdeeae","$schema":"faabea","$ref":"befcaa","$comment":"bf","title":"aacdcd","description":"bdc","readOnly":true,"examples":["ebaebb"],"multipleOf":6881.473,"maximum":104.632,"exclusiveMaximum":6088.522,"minimum":5386.734,"exclusiveMinimum":1063.007,"maxLength":30,"minLength":2807,"pattern":"cfeb","items":{"$id":"bfddfd","$schema":"ea","$ref":"ba","$comment":"dbebb","title":"aac","description":"cfd","readOnly":true,"examples":["ad"],"multipleOf":8745.228,"maximum":1468.777,"exclusiveMaximum":8478.052,"minimum":2643.71,"exclusiveMinimum":6477.591,"maxLength":8191,"minLength":5856,"pattern":"abaceb","additionalItems":{"$id":"ed","$schema":"bdfeda","$ref":"ef","$comment":"dd","title":"ab","description":"fdecf","readOnly":true,"examples":["adbbf"],"multipleOf":4529.082,"maximum":8803.554,"exclusiveMaximum":6283.462,"minimum":4980.335,"exclusiveMinimum":2901.678,"maxLength":3334,"minLength":93,"pattern":"bbbeea","items":[{"$id":"ec","$schema":"bada","$ref":"dbe","$comment":"cceec","title":"aa","description":"ceadd","readOnly":true,"examples":["bcdde"],"multipleOf":4394.605,"maximum":7019.063,"exclusiveMaximum":1605.003,"minimum":2404.316,"exclusiveMinimum":8792.838,"maxLength":5742,"minLength":4785,"pattern":"efaafd","additionalItems":{"$id":"ccfe","$schema":"cca","$ref":"ea","$comment":"eceb","title":"dcbef","description":"afab","readOnly":true,"examples":["cefedf"],"multipleOf":9727.903,"maximum":4158.505,"exclusiveMaximum":7674.981,"minimum":1959.72,"exclusiveMinimum":8242.554,"maxLength":1660,"minLength":6326,"pattern":"caefa","items":{"ebad":"edddff"},"bb":"dcdec"},"abcc":"cc"}],"de":"cfdca"},"cddfdf":"accefd"},"ecdb":"bb"},"ccccf":"ada"},"maxProperties":4581,"minProperties":6737,"required":["ea"],"additionalProperties":{"$id":"eabbff","$schema":"efccf","$ref":"cbbbd","$comment":"ccdfa","title":"fb","description":"dbbff","readOnly":true,"examples":["afbeaf"],"multipleOf":4933.189,"maximum":3771.449,"exclusiveMaximum":7339.696,"minimum":267.252,"exclusiveMinimum":1848.369,"maxLength":1109,"minLength":9207,"pattern":"ebbac","additionalItems":{"$id":"faf","$schema":"beda","$ref":"fdc","$comment":"bdbb","title":"bebdb","description":"cdaef","readOnly":true,"examples":["dc"],"multipleOf":4464.657,"maximum":1468.368,"exclusiveMaximum":3288.864,"minimum":7293.46,"exclusiveMinimum":3441.308,"maxLength":1887,"minLength":475,"pattern":"dfcbd","items":{"$id":"aaa","$schema":"bbbb","$ref":"aebbfb","$comment":"efbafb","title":"befffe","description":"decac","readOnly":true,"examples":["fbd"],"multipleOf":2065.334,"maximum":7205.459,"exclusiveMaximum":762.812,"minimum":8473.593,"exclusiveMinimum":5079.709,"maxLength":5686,"minLength":2615,"pattern":"afecef","additionalItems":{"$id":"bc","$schema":"dfcd","$ref":"bcfbd","$comment":"fbcadd","title":"affee","description":"afdfca","readOnly":true,"examples":["bcfef"],"multipleOf":7587.711,"maximum":2088.699,"exclusiveMaximum":7169.573,"minimum":7444.97,"exclusiveMinimum":9873.274,"maxLength":9777,"minLength":2781,"pattern":"bf","items":[{"$id":"ccdf","$schema":"eda","$ref":"cdcfdf","$comment":"ba","title":"beebc","description":"aa","readOnly":true,"examples":["acfde"],"multipleOf":2203.62,"maximum":3565.182,"exclusiveMaximum":3021.665,"minimum":9099.925,"exclusiveMinimum":8830.402,"maxLength":1787,"minLength":5432,"pattern":"daa","additionalItems":{"$id":"addbf","$schema":"afeed","$ref":"ef","$comment":"aabff","title":"cbcbf","description":"aabca","readOnly":true,"examples":["edbacb"],"multipleOf":1313.008,"maximum":9093.211,"exclusiveMaximum":1605.113,"minimum":6055.185,"exclusiveMinimum":8700.947,"maxLength":7668,"minLength":9871,"pattern":"edc","items":{"adecb":"cdbc"},"fff":"fedcff"},"abcbdd":"aedc"}],"fafe":"bfabe"},"cfefbb":"ea"},"ef":"bc"},"accfeb":"ecb"},"definitions":{"abf":{"$id":"eba","$schema":"ec","$ref":"daf","$comment":"fececc","title":"ad","description":"faccdc","readOnly":true,"examples":["fbdeaf"],"multipleOf":968.643,"maximum":3203.873,"exclusiveMaximum":1464.101,"minimum":9824.927,"exclusiveMinimum":4151.62,"maxLength":6363,"minLength":5249,"pattern":"debf","additionalItems":{"$id":"ee","$schema":"efcae","$ref":"aa","$comment":"eedbbd","title":"ebfac","description":"afcccc","readOnly":true,"examples":["dcd"],"multipleOf":4772.999,"maximum":2790.63,"exclusiveMaximum":4498.865,"minimum":6088.703,"exclusiveMinimum":9358.699,"maxLength":6825,"minLength":3901,"pattern":"ee","items":{"$id":"bcab","$schema":"ad","$ref":"de","$comment":"fdddef","title":"cab","description":"ad","readOnly":true,"examples":["bbf"],"multipleOf":3719.849,"maximum":1632.602,"exclusiveMaximum":3553.724,"minimum":6381.138,"exclusiveMinimum":577.49,"maxLength":2362,"minLength":6316,"pattern":"dbddbf","additionalItems":{"$id":"deebeb","$schema":"ffc","$ref":"fcf","$comment":"cdffb","title":"aeabef","description":"bc","readOnly":true,"examples":["fdfa"],"multipleOf":8596.65,"maximum":8611.056,"exclusiveMaximum":6716.312,"minimum":8137.529,"exclusiveMinimum":6335.107,"maxLength":7212,"minLength":1248,"pattern":"dba","items":[{"$id":"dace","$schema":"ffe","$ref":"aab","$comment":"caa","title":"ceeffd","description":"bc","readOnly":true,"examples":["bbaeb"],"multipleOf":4228.104,"maximum":7519.105,"exclusiveMaximum":1075.981,"minimum":1014.964,"exclusiveMinimum":6237.08,"maxLength":5849,"minLength":480,"pattern":"beaeaa","additionalItems":{"$id":"abc","$schema":"bc","$ref":"fe","$comment":"efb","title":"fcffcd","description":"db","readOnly":true,"examples":["aca"],"multipleOf":4698.421,"maximum":5997.322,"exclusiveMaximum":9794.854,"minimum":4118.917,"exclusiveMinimum":3644.416,"maxLength":7378,"pattern":"af","items":true,"maxItems":9209,"uniqueItems":true,"contains":{"dbeea":"efbada"},"cfecef":"fdea"},"bcaceb":"bbed"}],"bef":"ccff"},"fbedff":"bdfa"},"ccb":"afadf"},"dff":"cafe"}},"properties":{"faa":{"$id":"da","$schema":"faeff","$ref":"bcfcec","$comment":"fec","title":"ceb","description":"cf","readOnly":true,"examples":["cabe"],"multipleOf":3426.232,"maximum":1138.85,"exclusiveMaximum":4171.074,"minimum":6518.241,"exclusiveMinimum":7608.632,"maxLength":4027,"minLength":8625,"pattern":"eebe","additionalItems":{"$id":"dfddca","$schema":"eebb","$ref":"eccc","$comment":"eb","title":"bb","description":"fab","readOnly":true,"examples":["faaf"],"multipleOf":7405.04,"maximum":5476.095,"exclusiveMaximum":3179.993,"minimum":2202.067,"exclusiveMinimum":4956.045,"maxLength":6714,"minLength":8555,"pattern":"cdac","items":{"$id":"cfac","$schema":"bfe","$ref":"bfaea","$comment":"affeea","title":"bc","description":"ebf","readOnly":true,"examples":["ad"],"multipleOf":9675.203,"maximum":7744.998,"exclusiveMaximum":322.924,"minimum":3258.774,"exclusiveMinimum":4786.324,"maxLength":8898,"minLength":813,"pattern":"edaddd","additionalItems":{"$id":"bdab","$schema":"cdadb","$ref":"ecbacf","$comment":"caeae","title":"ce","description":"de","readOnly":true,"examples":["eaca"],"multipleOf":8477.157,"maximum":8713.779,"exclusiveMaximum":4541.136,"minimum":8820.957,"exclusiveMinimum":155.02,"maxLength":4297,"minLength":8731,"pattern":"cbdead","items":[{"$id":"bbdb","$schema":"bf","$ref":"ebdf","$comment":"ed","title":"bdfeb","description":"cfba","readOnly":true,"examples":["dacee"],"multipleOf":7056.506,"maximum":3449.269,"exclusiveMaximum":287.194,"minimum":8978.609,"exclusiveMinimum":4085.849,"maxLength":4346,"minLength":9311,"pattern":"bc","additionalItems":{"$id":"efb","$schema":"aed","$ref":"ffd","$comment":"cf","title":"ec","description":"fbfee","readOnly":true,"examples":["eaca"],"multipleOf":2483.659,"maximum":5295.014,"exclusiveMaximum":2951.491,"minimum":9514.692,"exclusiveMinimum":8726.989,"maxLength":3125,"pattern":"ebc","items":true,"maxItems":8970,"uniqueItems":true,"contains":{"facff":"dbb"},"bdce":"fbf"},"ca":"ed"}],"dbcc":"cba"},"dcbe":"cdeec"},"dcdfa":"cdeac"},"ceb":"caeed"}},"patternProperties":{"fca":{"$id":"cbfed","$schema":"bcaaf","$ref":"bcef","$comment":"bfab","title":"bacfe","description":"eabc","readOnly":true,"examples":["ebfc"],"multipleOf":5071.687,"maximum":8533.244,"exclusiveMaximum":4547.468,"minimum":7213.709,"exclusiveMinimum":5879.127,"maxLength":9310,"minLength":2641,"pattern":"cfbb","additionalItems":{"$id":"dafcaf","$schema":"eefe","$ref":"aafddd","$comment":"bf","title":"bdaaec","description":"eaadfb","readOnly":true,"examples":["cafff"],"multipleOf":2338.453,"maximum":7988.736,"exclusiveMaximum":1767.612,"minimum":6137.632,"exclusiveMinimum":3911.6,"maxLength":7262,"minLength":3206,"pattern":"ae","items":{"$id":"ea","$schema":"bfbfd","$ref":"fbbd","$comment":"edfbbd","title":"ee","description":"bbcb","readOnly":true,"examples":["bfecf"],"multipleOf":8009.204,"maximum":3304.587,"exclusiveMaximum":5466.654,"minimum":8435.098,"exclusiveMinimum":1816.913,"maxLength":4284,"minLength":7008,"pattern":"bdccfc","additionalItems":{"$id":"deeca","$schema":"fafe","$ref":"aaf","$comment":"ae","title":"cabb","description":"aafcb","readOnly":true,"examples":["deed"],"multipleOf":530.52,"maximum":8218.672,"exclusiveMaximum":8390.621,"minimum":6282.768,"exclusiveMinimum":3665.756,"maxLength":9563,"minLength":9223,"pattern":"babb","items":[{"$id":"eaefb","$schema":"bc","$ref":"baaf","$comment":"cdff","title":"ea","description":"be","readOnly":true,"examples":["cf"],"multipleOf":1924.3,"maximum":3949.428,"exclusiveMaximum":1052.784,"minimum":4616.336,"exclusiveMinimum":963.585,"maxLength":5609,"minLength":4369,"pattern":"aefff","additionalItems":{"$id":"cc","$schema":"aea","$ref":"ebada","$comment":"cab","title":"afbbc","description":"deecba","readOnly":true,"examples":["cabd"],"multipleOf":1294.715,"maximum":8731.071,"exclusiveMaximum":7809.456,"minimum":7003.194,"exclusiveMinimum":2616.332,"maxLength":4705,"pattern":"fdea","items":true,"maxItems":3635,"uniqueItems":true,"contains":{"edfdc":"dfd"},"fbfad":"fcbee"},"eafbaa":"ddc"}],"efc":"fcfa"},"ebb":"dfca"},"dffab":"bc"},"fc":"af"}},"dependencies":{"eefed":{"$id":"ece","$schema":"cedfbd","$ref":"aabdec","$comment":"df","title":"cbebf","description":"dafa","readOnly":true,"examples":["adedfc"],"multipleOf":3930.337,"maximum":9490.775,"exclusiveMaximum":7906.579,"minimum":9523.513,"exclusiveMinimum":6451.139,"maxLength":1071,"minLength":3939,"pattern":"ecd","additionalItems":{"$id":"aeddba","$schema":"ebfd","$ref":"ad","$comment":"fe","title":"cedb","description":"ecbda","readOnly":true,"examples":["da"],"multipleOf":3638.036,"maximum":2364.605,"exclusiveMaximum":6575.577,"minimum":6606.323,"exclusiveMinimum":4533.265,"maxLength":896,"minLength":7691,"pattern":"cbecc","items":{"$id":"ea","$schema":"fdcade","$ref":"bebfbb","$comment":"cccdd","title":"cbabc","description":"afbefe","readOnly":true,"examples":["eeccb"],"multipleOf":2772.724,"maximum":2653.558,"exclusiveMaximum":5348.788,"minimum":1100.658,"exclusiveMinimum":7679.861,"maxLength":7113,"minLength":531,"pattern":"bafaae","additionalItems":{"$id":"ffdcfb","$schema":"eecee","$ref":"bbccef","$comment":"fabfcb","title":"cf","description":"fbae","readOnly":true,"examples":["ccac"],"multipleOf":3537.124,"maximum":4924.12,"exclusiveMaximum":2539.135,"minimum":667.921,"exclusiveMinimum":9110.269,"maxLength":5970,"minLength":7256,"pattern":"fec","maxItems":345,"minItems":2813,"uniqueItems":true,"contains":{"$id":"ddbe","$schema":"cbc","$ref":"eb","$comment":"cbea","title":"cfe","description":"aedcf","readOnly":true,"examples":["eabcab"],"multipleOf":7397.659,"maximum":9904.072,"exclusiveMaximum":5437.349,"minimum":7739.389,"exclusiveMinimum":7314.642,"maxLength":3343,"minLength":6023,"pattern":"bfeada","additionalItems":{"$id":"deaba","$schema":"db","$ref":"ee","$comment":"bbefdc","title":"ecbbff","description":"bbcaf","readOnly":true,"examples":["bbcda"],"multipleOf":4218.909,"maximum":7580.859,"exclusiveMaximum":4385.947,"minimum":8519.606,"exclusiveMinimum":8014.083,"maxLength":8442,"minLength":157,"pattern":"ed","items":{"eee":"ca"},"eaa":"cbede"},"edde":"daea"},"bfcfc":"facbd"},"bd":"fdceb"},"ea":"ab"},"ddc":"dbb"}},"propertyNames":{"$id":"cfccc","$schema":"fdef","$ref":"fafa","$comment":"ebfcf","title":"bdfbb","description":"ccefc","readOnly":true,"examples":["ccabb"],"multipleOf":3563.046,"maximum":9357.596,"exclusiveMaximum":5051.997,"minimum":2836.162,"exclusiveMinimum":4028.073,"maxLength":2746,"minLength":8544,"pattern":"aae","additionalItems":{"$id":"cdeb","$schema":"cb","$ref":"dbc","$comment":"aacb","title":"ce","description":"ceeff","readOnly":true,"examples":["affaac"],"multipleOf":9377.255,"maximum":3914.912,"exclusiveMaximum":9899.648,"minimum":2402.482,"exclusiveMinimum":9820.002,"maxLength":6864,"minLength":5850,"pattern":"fab","items":{"$id":"cabca","$schema":"bf","$ref":"dbedae","$comment":"ce","title":"abba","description":"eefac","readOnly":true,"examples":["fcddb"],"multipleOf":3217.16,"maximum":3182.862,"exclusiveMaximum":7802.243,"minimum":685.972,"exclusiveMinimum":1458.709,"maxLength":3531,"minLength":2449,"pattern":"dbaef","additionalItems":{"$id":"eb","$schema":"cfdd","$ref":"fe","$comment":"eacb","title":"febab","description":"eec","readOnly":true,"examples":["acaab"],"multipleOf":3346.537,"maximum":4538.846,"exclusiveMaximum":8531.366,"minimum":5578.695,"exclusiveMinimum":8855.367,"maxLength":5061,"minLength":1814,"pattern":"cbbffe","items":[{"$id":"abcebc","$schema":"eebdc","$ref":"deceb","$comment":"dd","title":"dcadb","description":"fbbc","readOnly":true,"examples":["ceccf"],"multipleOf":4097.903,"maximum":9599.869,"exclusiveMaximum":873.438,"minimum":5164.115,"exclusiveMinimum":3711.268,"maxLength":6428,"minLength":6721,"pattern":"ede","additionalItems":{"$id":"cfa","$schema":"fdac","$ref":"fdfafe","$comment":"fefebb","title":"addc","description":"bbccf","readOnly":true,"examples":["faca"],"multipleOf":3644.29,"maximum":8680.533,"exclusiveMaximum":8922.847,"minimum":5411.264,"exclusiveMinimum":278.09,"maxLength":7982,"minLength":854,"pattern":"aef","items":{"edfca":"edcf"},"efbf":"ecc"},"ba":"bfbed"}],"df":"af"},"decd":"dbba"},"add":"ebe"},"dfaafa":"eebe"},"enum":["adbe"],"type":"array","format":"feaa","contentMediaType":"efee","contentEncoding":"aebc","if":{"$id":"ad","$schema":"fdbed","$ref":"ddad","$comment":"ebef","title":"feb","description":"ec","readOnly":true,"examples":["ac"],"multipleOf":7511.147,"maximum":4628.785,"exclusiveMaximum":2118.002,"minimum":5325.378,"exclusiveMinimum":8301.735,"maxLength":8259,"minLength":2401,"pattern":"bfbde","additionalItems":{"$id":"bb","$schema":"edbefe","$ref":"ed","$comment":"fbdffc","title":"fbcfeb","description":"edeccc","readOnly":true,"examples":["daccfa"],"multipleOf":8106.48,"maximum":5153.686,"exclusiveMaximum":8600.126,"minimum":452.093,"exclusiveMinimum":4586.05,"maxLength":119,"minLength":9306,"pattern":"db","items":{"$id":"cb","$schema":"cf","$ref":"bfeba","$comment":"abf","title":"fafde","description":"fbeaad","readOnly":true,"examples":["bfae"],"multipleOf":5154.422,"maximum":5192.47,"exclusiveMaximum":4000.059,"minimum":2402.211,"exclusiveMinimum":9862.482,"maxLength":3859,"minLength":282,"pattern":"ffae","additionalItems":{"$id":"ceec","$schema":"ce","$ref":"cddb","$comment":"fdcba","title":"ba","description":"be","readOnly":true,"examples":["cec"],"multipleOf":4107.622,"maximum":416.701,"exclusiveMaximum":2240.753,"minimum":9897.08,"exclusiveMinimum":7230.852,"maxLength":4649,"minLength":5963,"pattern":"eedbbb","items":[{"$id":"bbbc","$schema":"cfbadf","$ref":"adfbd","$comment":"eafe","title":"ddfae","description":"cdadb","readOnly":true,"examples":["eedeaa"],"multipleOf":2507.821,"maximum":2206.72,"exclusiveMaximum":4758.479,"minimum":439.171,"exclusiveMinimum":4731.603,"maxLength":7132,"minLength":1690,"pattern":"efffd","additionalItems":{"$id":"aff","$schema":"ffbfbe","$ref":"bf","$comment":"cdaeaf","title":"cbedeb","description":"ed","readOnly":true,"examples":["dbdafc"],"multipleOf":8676.404,"maximum":8255.458,"exclusiveMaximum":8498.869,"minimum":181.05,"exclusiveMinimum":8084.305,"maxLength":5731,"minLength":1307,"pattern":"eccd","items":{"ffb":"ed"},"fda":"ccfdd"},"dbbccd":"ad"}],"ddadff":"abff"},"eeced":"bb"},"baaad":"fdbdf"},"ffb":"bbce"},"then":{"$id":"fb","$schema":"fb","$ref":"adb","$comment":"ac","title":"cecab","description":"afeef","readOnly":true,"examples":["adfae"],"multipleOf":7029.614,"maximum":235.932,"exclusiveMaximum":1850.165,"minimum":5306.341,"exclusiveMinimum":5657.756,"maxLength":3771,"minLength":9088,"pattern":"bed","additionalItems":{"$id":"badaa","$schema":"eb","$ref":"cddfb","$comment":"fdc","title":"ad","description":"fd","readOnly":true,"examples":["dcc"],"multipleOf":4663.624,"maximum":777.466,"exclusiveMaximum":4910.594,"minimum":2089.227,"exclusiveMinimum":7668.857,"maxLength":8392,"minLength":6343,"pattern":"ddfae","items":{"$id":"fcb","$schema":"caa","$ref":"bc","$comment":"dfcde","title":"aeaabe","description":"dc","readOnly":true,"examples":["bcedff"],"multipleOf":1937.652,"maximum":146.673,"exclusiveMaximum":772.081,"minimum":2152.881,"exclusiveMinimum":7565.477,"maxLength":1174,"minLength":5641,"pattern":"bcbdd","additionalItems":{"$id":"dea","$schema":"bcf","$ref":"bbe","$comment":"ddd","title":"cfdbcb","description":"afed","readOnly":true,"examples":["aaddc"],"multipleOf":754.033,"maximum":2189.55,"exclusiveMaximum":4257.818,"minimum":3308.452,"exclusiveMinimum":6020.476,"maxLength":3179,"minLength":4254,"pattern":"fdb","items":[{"$id":"cfda","$schema":"ae","$ref":"cccbcb","$comment":"dfcfc","title":"eb","description":"eeba","readOnly":true,"examples":["fcff"],"multipleOf":163.951,"maximum":6194.302,"exclusiveMaximum":2208.965,"minimum":9807.01,"exclusiveMinimum":5115.111,"maxLength":6435,"minLength":7883,"pattern":"dbbcde","additionalItems":{"$id":"cbee","$schema":"ccd","$ref":"edddc","$comment":"abdc","title":"cef","description":"fffa","readOnly":true,"examples":["fcfbd"],"multipleOf":8167.723,"maximum":4336.992,"exclusiveMaximum":8778.136,"minimum":444.218,"exclusiveMinimum":5710.517,"maxLength":6953,"minLength":9640,"pattern":"afbe","items":{"fadcee":"dcbfe"},"bbdebf":"ffeef"},"fbea":"aebcf"}],"fde":"eba"},"aadb":"fcfa"},"eea":"bde"},"dbfbd":"eddd"},"else":{"$id":"adcfab","$schema":"bbcda","$ref":"eb","$comment":"cd","title":"dcbd","description":"aaaca","readOnly":true,"examples":["ff"],"multipleOf":4979.965,"maximum":7419.9,"exclusiveMaximum":9700.117,"minimum":9828.825,"exclusiveMinimum":9811.716,"maxLength":4161,"minLength":3199,"pattern":"aac","additionalItems":{"$id":"ecfb","$schema":"fcd","$ref":"fefdbd","$comment":"ccffd","title":"afbd","description":"da","readOnly":true,"examples":["cab"],"multipleOf":726.083,"maximum":4190.405,"exclusiveMaximum":1727.838,"minimum":6722.745,"exclusiveMinimum":3224.252,"maxLength":7952,"minLength":2484,"pattern":"cbdcae","items":{"$id":"bfbf","$schema":"eaf","$ref":"cb","$comment":"cdfd","title":"bea","description":"bacf","readOnly":true,"examples":["ed"],"multipleOf":9255.547,"maximum":6763.89,"exclusiveMaximum":9280.021,"minimum":2317.8,"exclusiveMinimum":2179.355,"maxLength":4136,"minLength":6830,"pattern":"ceedf","additionalItems":{"$id":"bdcb","$schema":"bbdbb","$ref":"ff","$comment":"efceea","title":"cdcfac","description":"bebdb","readOnly":true,"examples":["cced"],"multipleOf":464.688,"maximum":4718.719,"exclusiveMaximum":6277.669,"minimum":9818.262,"exclusiveMinimum":6554.632,"maxLength":1329,"minLength":2560,"pattern":"cfdc","items":[{"$id":"cd","$schema":"dd","$ref":"cb","$comment":"ecfeb","title":"de","description":"ccac","readOnly":true,"examples":["acfcef"],"multipleOf":9481.089,"maximum":2777.85,"exclusiveMaximum":9892.559,"minimum":8272.176,"exclusiveMinimum":2411.349,"maxLength":3645,"minLength":9337,"pattern":"cee","additionalItems":{"$id":"ed","$schema":"afdbd","$ref":"dfcbb","$comment":"dae","title":"be","description":"bacbab","readOnly":true,"examples":["bbfaf"],"multipleOf":8788.026,"maximum":875.64,"exclusiveMaximum":4024.206,"minimum":3998.15,"exclusiveMinimum":2032.733,"maxLength":2796,"minLength":4064,"pattern":"ebcf","items":{"bcfdbc":"fba"},"adcfdb":"abf"},"eacae":"cdcbb"}],"daddac":"ebedcb"},"cbddde":"fefc"},"ecfb":"eabecc"},"dbb":"fd"},"allOf":[{"$id":"ddaa","$schema":"dfcc","$ref":"fa","$comment":"bc","title":"fdac","description":"db","readOnly":true,"examples":["bccdc"],"multipleOf":293.692,"maximum":6285.031,"exclusiveMaximum":5551.313,"minimum":6455.082,"exclusiveMinimum":2930.686,"maxLength":2494,"minLength":5775,"pattern":"cebc","additionalItems":{"$id":"bdf","$schema":"ea","$ref":"badfe","$comment":"edadda","title":"debbf","description":"accdcb","readOnly":true,"examples":["ebdfa"],"multipleOf":4446.366,"maximum":7311.645,"exclusiveMaximum":9567.352,"minimum":5455.166,"exclusiveMinimum":9321.21,"maxLength":6065,"minLength":4354,"pattern":"fdba","items":{"$id":"adffc","$schema":"feaf","$ref":"eb","$comment":"db","title":"cd","description":"cdcdef","readOnly":true,"examples":["dd"],"multipleOf":6789.959,"maximum":1564.413,"exclusiveMaximum":7240.122,"minimum":1939.455,"exclusiveMinimum":26.43,"maxLength":4951,"minLength":4077,"pattern":"aaea","additionalItems":{"$id":"af","$schema":"faafb","$ref":"cdbfab","$comment":"aad","title":"fc","description":"aeb","readOnly":true,"examples":["aecfe"],"multipleOf":3038.281,"maximum":8927.122,"exclusiveMaximum":5217.071,"minimum":8363.857,"exclusiveMinimum":7123.41,"maxLength":5265,"minLength":3053,"pattern":"ebea","items":[{"$id":"ade","$schema":"cbdbdf","$ref":"ebeebc","$comment":"aeea","title":"dfcbf","description":"dacfa","readOnly":true,"examples":["cccccd"],"multipleOf":8251.928,"maximum":703.668,"exclusiveMaximum":320.81,"minimum":5588.936,"exclusiveMinimum":8779.726,"maxLength":6752,"minLength":346,"pattern":"aed","additionalItems":{"$id":"ddef","$schema":"dac","$ref":"ddfed","$comment":"cef","title":"dbde","description":"abafb","readOnly":true,"examples":["ec"],"multipleOf":1913.529,"maximum":2146.768,"exclusiveMaximum":3871.075,"minimum":9712.17,"exclusiveMinimum":8540.744,"maxLength":2522,"pattern":"faf","items":true,"maxItems":6236,"uniqueItems":true,"contains":{"afbcef":"eda"},"ddfa":"cefaf"},"bcba":"bd"}],"ac":"aecbe"},"dacc":"bceddc"},"ee":"bfe"},"ffaebd":"bca"}],"anyOf":[{"$id":"fadcb","$schema":"feabcf","$ref":"cea","$comment":"bdabd","title":"fa","description":"bdfeb","readOnly":true,"examples":["bdacaa"],"multipleOf":7334.327,"maximum":6262.463,"exclusiveMaximum":7221.387,"minimum":976.729,"exclusiveMinimum":2771.143,"maxLength":2510,"minLength":4077,"pattern":"abbbed","additionalItems":{"$id":"ca","$schema":"bdd","$ref":"cbeec","$comment":"aefbe","title":"ef","description":"bfe","readOnly":true,"examples":["eb"],"multipleOf":6060.747,"maximum":8080.599,"exclusiveMaximum":261.573,"minimum":9572.734,"exclusiveMinimum":71.46,"maxLength":2596,"minLength":595,"pattern":"fbcb","items":{"$id":"eaaef","$schema":"feecd","$ref":"dbca","$comment":"cbee","title":"ba","description":"bdb","readOnly":true,"examples":["ea"],"multipleOf":1501.835,"maximum":4590.221,"exclusiveMaximum":2659.804,"minimum":9086.513,"exclusiveMinimum":6895.259,"maxLength":34,"minLength":151,"pattern":"ac","additionalItems":{"$id":"ce","$schema":"cac","$ref":"facac","$comment":"da","title":"fc","description":"dffb","readOnly":true,"examples":["fee"],"multipleOf":4845.216,"maximum":8645.436,"exclusiveMaximum":8874.663,"minimum":2810.56,"exclusiveMinimum":1375.298,"maxLength":9588,"minLength":9644,"pattern":"eca","items":[{"$id":"cebb","$schema":"bdaef","$ref":"caaeb","$comment":"aacd","title":"cdcaaa","description":"ee","readOnly":true,"examples":["ddbe"],"multipleOf":4123.377,"maximum":156.577,"exclusiveMaximum":6115.829,"minimum":6000.682,"exclusiveMinimum":5468.798,"maxLength":2517,"minLength":3893,"pattern":"addbb","additionalItems":{"$id":"dddce","$schema":"cca","$ref":"cedcf","$comment":"ba","title":"bf","description":"dfabeb","readOnly":true,"examples":["dcaea"],"multipleOf":4509.476,"maximum":9274.157,"exclusiveMaximum":3487.919,"minimum":7014.945,"exclusiveMinimum":3833.42,"maxLength":4125,"pattern":"fffbdd","items":true,"maxItems":6310,"uniqueItems":true,"contains":{"fcaec":"edaa"},"fab":"deaea"},"efccae":"ec"}],"ccac":"dfba"},"deafeb":"ed"},"ee":"ffdcaa"},"dfcaac":"fedb"}],"oneOf":[{"$id":"ecaaf","$schema":"edbffb","$ref":"acfcdf","$comment":"efcbfe","title":"feba","description":"eee","readOnly":true,"examples":["ebdad"],"multipleOf":7921.044,"maximum":5551.489,"exclusiveMaximum":3985.278,"minimum":9707.449,"exclusiveMinimum":9921.167,"maxLength":918,"minLength":598,"pattern":"add","additionalItems":{"$id":"aef","$schema":"faf","$ref":"bbaac","$comment":"bf","title":"de","description":"feebcf","readOnly":true,"examples":["fb"],"multipleOf":2772.924,"maximum":6934.009,"exclusiveMaximum":961.534,"minimum":4384.82,"exclusiveMinimum":1188.185,"maxLength":2187,"minLength":3179,"pattern":"efdbcc","items":{"$id":"fe","$schema":"cf","$ref":"ddcebb","$comment":"aab","title":"abae","description":"cdfdab","readOnly":true,"examples":["ebabf"],"multipleOf":2317.406,"maximum":8471.282,"exclusiveMaximum":9560.112,"minimum":5034.273,"exclusiveMinimum":915.799,"maxLength":5272,"minLength":775,"pattern":"cdfddf","additionalItems":{"$id":"affa","$schema":"ebaff","$ref":"cb","$comment":"fef","title":"dee","description":"fabac","readOnly":true,"examples":["ee"],"multipleOf":5941.849,"maximum":7937.101,"exclusiveMaximum":1253.694,"minimum":1766.055,"exclusiveMinimum":7853.904,"maxLength":931,"minLength":6200,"pattern":"db","items":[{"$id":"cdd","$schema":"fce","$ref":"fabeaa","$comment":"fd","title":"bdbdc","description":"bcd","readOnly":true,"examples":["ab"],"multipleOf":2498.53,"maximum":3839.759,"exclusiveMaximum":3052.711,"minimum":1890.437,"exclusiveMinimum":9424.467,"maxLength":4688,"minLength":6189,"pattern":"feef","additionalItems":{"$id":"adf","$schema":"dfecea","$ref":"fcebc","$comment":"aceafc","title":"aaed","description":"badff","readOnly":true,"examples":["badda"],"multipleOf":6639.797,"maximum":5644.571,"exclusiveMaximum":8519.694,"minimum":7847.015,"exclusiveMinimum":1903.031,"maxLength":6429,"pattern":"ddea","items":true,"maxItems":8919,"uniqueItems":true,"contains":{"db":"ad"},"fda":"eeb"},"ccefbc":"cba"}],"edeaa":"fccddc"},"fdcca":"abfdf"},"adedaf":"fcebcb"},"fe":"fcdc"}],"not":{"$id":"eea","$schema":"de","$ref":"edbfba","$comment":"aeebb","title":"dbc","description":"ba","readOnly":true,"examples":["bfefd"],"multipleOf":3850.021,"maximum":9929.821,"exclusiveMaximum":7684.81,"minimum":3242.289,"exclusiveMinimum":6185.427,"maxLength":354,"minLength":4918,"pattern":"ba","additionalItems":{"$id":"efcfe","$schema":"bddfe","$ref":"aadbcf","$comment":"ee","title":"ddcbc","description":"ad","readOnly":true,"examples":["febbde"],"multipleOf":6827.044,"maximum":6754.8,"exclusiveMaximum":9375.545,"minimum":7955.232,"exclusiveMinimum":3941.896,"maxLength":400,"minLength":2726,"pattern":"dbb","items":{"$id":"fc","$schema":"fdfc","$ref":"aeb","$comment":"eafb","title":"ddaff","description":"acf","readOnly":true,"examples":["defbfe"],"multipleOf":4536.297,"maximum":7719.146,"exclusiveMaximum":979.323,"minimum":4583.946,"exclusiveMinimum":3187.435,"maxLength":2922,"minLength":1206,"pattern":"dfbcbd","additionalItems":{"$id":"dcefdb","$schema":"dbcdaf","$ref":"aebe","$comment":"eeeece","title":"bcac","description":"bee","readOnly":true,"examples":["fec"],"multipleOf":9100.642,"maximum":7262.292,"exclusiveMaximum":9802.02,"minimum":890.502,"exclusiveMinimum":7581.167,"maxLength":3267,"minLength":5741,"pattern":"aaeae","items":[{"$id":"bdbcfb","$schema":"cad","$ref":"bb","$comment":"aaace","title":"cd","description":"bdea","readOnly":true,"examples":["afc"],"multipleOf":9712.862,"maximum":3451.281,"exclusiveMaximum":1650.558,"minimum":9804.067,"exclusiveMinimum":7272.627,"maxLength":6313,"minLength":8907,"pattern":"dcc","additionalItems":{"$id":"edd","$schema":"ba","$ref":"afdbc","$comment":"aef","title":"dfb","description":"debad","readOnly":true,"examples":["fdfbe"],"multipleOf":1296.829,"maximum":1523.861,"exclusiveMaximum":7561.943,"minimum":4014.753,"exclusiveMinimum":7937.774,"maxLength":1972,"minLength":5849,"pattern":"ccc","items":{"cdcac":"ddf"},"efad":"bfdead"},"fdcdbd":"cef"}],"dbbcf":"ebefc"},"fbefbd":"bad"},"faff":"aef"},"fe":"debe"},"ffaeb":"cf"}`)
		v         jsonschema.Schema
	)

	err := json.Unmarshal(jsonValue, &v)
	if err != nil {
		t.Fatal(err)
	}
}
Panic trace.
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1e pc=0x10bad65]

goroutine 35 [running]:
testing.tRunner.func1.2(0x143d820, 0x1708fb0)
	/Users/viacheslavpoturaev/sdk/go1.16beta1/src/testing/testing.go:1144 +0x332
testing.tRunner.func1(0xc000a08300)
	/Users/viacheslavpoturaev/sdk/go1.16beta1/src/testing/testing.go:1147 +0x4b6
panic(0x143d820, 0x1708fb0)
	/Users/viacheslavpoturaev/sdk/go1.16beta1/src/runtime/panic.go:965 +0x1b9
reflect.(*rtype).Kind(0x7, 0xc000c42690)
	/Users/viacheslavpoturaev/sdk/go1.16beta1/src/reflect/type.go:780 +0x5
github.com/goccy/go-json.(*rtype).Kind(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/rtype.go:88
github.com/goccy/go-json.(*interfaceDecoder).decode(0xc000c22870, 0xc000c00580, 0x8, 0x8, 0x0, 0xc000c42690, 0x100fb58, 0x10, 0x1436f20)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_interface.go:211 +0x1a5
github.com/goccy/go-json.unmarshal(0xc000c00508, 0x7, 0x7, 0x14246e0, 0xc000c42690, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c17e00, 0xc000c00550, 0xe, 0xe, 0xc000c17e00, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:582 +0x305
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c00540, 0xf, 0xf, 0x0, 0xc000c17e00, 0xc000c00540, 0xc000c00530, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c00540, 0xf, 0xf, 0x0, 0xc000c42650, 0x100f632, 0x100be7f, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c00530, 0xe, 0xe, 0x1421ee0, 0xc000c42650, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c42650, 0xc000c00530, 0xe, 0xe, 0xc000c42650, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22720, 0xc000c00520, 0xf, 0xf, 0x0, 0xc000c42650, 0xc000c00520, 0xc000c00510, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d700, 0xc000c00520, 0xf, 0xf, 0x0, 0xc000c448a0, 0xc000c227b0, 0xc000b857b0, 0x101078d)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c00510, 0xe, 0xe, 0x1421f20, 0xc000c448a0, 0x14512a0, 0x31a5a68)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Items).UnmarshalJSON(0xc000c448a0, 0xc000c00510, 0xe, 0xe, 0xc000c448a0, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:709 +0x85
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22300, 0xc000c74420, 0x14a, 0x14a, 0x12c, 0xc000c448a0, 0x25, 0x12b, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c9c0, 0xc000c74420, 0x14a, 0x14a, 0x12c, 0xc000c17cc0, 0xc000c3ca00, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c74420, 0x14a, 0x14a, 0x0, 0xc000c17c20, 0xc000c17c20, 0xc000c17a40, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c742c0, 0x149, 0x149, 0x1423a60, 0xc000c17c20, 0x59, 0x1)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c17a40, 0xc000c742c0, 0x149, 0x149, 0xc000c17a40, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c74160, 0x14a, 0x14a, 0x0, 0xc000c17a40, 0xc000c74160, 0xc000c74000, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c74160, 0x14a, 0x14a, 0x0, 0xc000c425b0, 0x100f632, 0x100be7f, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c74000, 0x149, 0x149, 0x1421ee0, 0xc000c425b0, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c425b0, 0xc000c74000, 0x149, 0x149, 0xc000c425b0, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c222d0, 0xc000c72000, 0x299, 0x299, 0x141, 0xc000c425b0, 0x169, 0x140, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c900, 0xc000c72000, 0x299, 0x299, 0x141, 0xc000c178f8, 0xc000c3c940, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c72000, 0x299, 0x299, 0x0, 0xc000c17860, 0xc000c17860, 0xc000c17680, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c6fb80, 0x298, 0x298, 0x1423a60, 0xc000c17860, 0x203000, 0xd)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c17680, 0xc000c6fb80, 0x298, 0x298, 0xc000c17680, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c6f8c0, 0x299, 0x299, 0x0, 0xc000c17680, 0xc000c6f8c0, 0xc000c6f600, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c6f8c0, 0x299, 0x299, 0x0, 0xc000c44880, 0x100f632, 0x100be7f, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c6f600, 0x298, 0x298, 0x1421ee0, 0xc000c44880, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c44880, 0xc000c6f600, 0x298, 0x298, 0xc000c44880, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22780, 0xc000c6f340, 0x29b, 0x29b, 0x1, 0xc000c44880, 0x0, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*sliceDecoder).decode(0xc000c40380, 0xc000c6f340, 0x29b, 0x29b, 0x0, 0xc000c44848, 0x49c43e29d416aad4, 0x15375c0, 0x15306e4)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_slice.go:215 +0x370
github.com/goccy/go-json.unmarshal(0xc000c6e000, 0x29a, 0x29a, 0x1422420, 0xc000c44848, 0x15375c0, 0xc000c3a168)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Items).UnmarshalJSON(0xc000c44840, 0xc000c6e000, 0x29a, 0x29a, 0xc000c44840, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:717 +0xf6
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22300, 0xc000c6cc00, 0x3db, 0x3db, 0x131, 0xc000c44840, 0x2b1, 0x130, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c9c0, 0xc000c6cc00, 0x3db, 0x3db, 0x131, 0xc000c17180, 0xc000c3ca00, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c6cc00, 0x3db, 0x3db, 0x0, 0xc000c170e0, 0xc000c170e0, 0xc000c16f00, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c6c800, 0x3da, 0x3da, 0x1423a60, 0xc000c170e0, 0x41, 0x1)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c16f00, 0xc000c6c800, 0x3da, 0x3da, 0xc000c16f00, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c6c400, 0x3db, 0x3db, 0x0, 0xc000c16f00, 0xc000c6c400, 0xc000c6c000, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c6c400, 0x3db, 0x3db, 0x0, 0xc000c42430, 0x100f632, 0x100be7f, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c6c000, 0x3da, 0x3da, 0x1421ee0, 0xc000c42430, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c42430, 0xc000c6c000, 0x3da, 0x3da, 0xc000c42430, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c222d0, 0xc000c69b80, 0x527, 0x527, 0x13f, 0xc000c42430, 0x3f9, 0x13e, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c900, 0xc000c69b80, 0x527, 0x527, 0x13f, 0xc000c16db8, 0xc000c3c940, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c69b80, 0x527, 0x527, 0x0, 0xc000c16d20, 0xc000c16d20, 0xc000c16b40, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c69600, 0x526, 0x526, 0x1423a60, 0xc000c16d20, 0xc000a1cba0, 0x100f632)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c16b40, 0xc000c69600, 0x526, 0x526, 0xc000c16b40, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c69080, 0x527, 0x527, 0x0, 0xc000c16b40, 0xc000c69080, 0xc000c68b00, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c69080, 0x527, 0x527, 0x0, 0xc000c42390, 0x100f632, 0x100be7f, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c68b00, 0x526, 0x526, 0x1421ee0, 0xc000c42390, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c42390, 0xc000c68b00, 0x526, 0x526, 0xc000c42390, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22720, 0xc000c68580, 0x527, 0x527, 0x0, 0xc000c42390, 0x0, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d700, 0xc000c68580, 0x527, 0x527, 0x0, 0xc000c44820, 0xc000c226f0, 0xc000a1cef8, 0x101078d)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c68000, 0x526, 0x526, 0x1421f20, 0xc000c44820, 0x0, 0x31a5a68)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Items).UnmarshalJSON(0xc000c44820, 0xc000c68000, 0x526, 0x526, 0xc000c44820, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:709 +0x85
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22300, 0xc000c65500, 0x668, 0x668, 0x12f, 0xc000c44820, 0x540, 0x12e, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c9c0, 0xc000c65500, 0x668, 0x668, 0x12f, 0xc000c16a00, 0xc000c3ca00, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c65500, 0x668, 0x668, 0x0, 0xc000c16960, 0xc000c16960, 0xc000c16780, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c64e00, 0x667, 0x667, 0x1423a60, 0xc000c16960, 0x2c, 0x1)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c16780, 0xc000c64e00, 0x667, 0x667, 0xc000c16780, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c64700, 0x668, 0x668, 0x0, 0xc000c16780, 0xc000c64700, 0xc000c64000, 0x113312f)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c64700, 0x668, 0x668, 0x0, 0xc000c422e0, 0x100f632, 0x100be7f, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c64000, 0x667, 0x667, 0x1421ee0, 0xc000c422e0, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c422e0, 0xc000c64000, 0x667, 0x667, 0xc000c422e0, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c222d0, 0xc000c63800, 0x7b6, 0x7b6, 0x13f, 0xc000c422e0, 0x688, 0x13e, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c900, 0xc000c63800, 0x7b6, 0x7b6, 0x13f, 0xc000c16638, 0xc000c3c940, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c63800, 0x7b6, 0x7b6, 0x0, 0xc000c165a0, 0xc000c165a0, 0xc000c163c0, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c63000, 0x7b5, 0x7b5, 0x1423a60, 0xc000c165a0, 0xc000a1d700, 0x113696a)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c163c0, 0xc000c63000, 0x7b5, 0x7b5, 0xc000c163c0, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c226c0, 0xc000c62800, 0x7b6, 0x7b6, 0x0, 0xc000c163c0, 0x0, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3d680, 0xc000c62800, 0x7b6, 0x7b6, 0x0, 0xc000c42230, 0xc000a1d8e0, 0x100bfac, 0x174cc10)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.unmarshal(0xc000c62000, 0x7b5, 0x7b5, 0x1421ee0, 0xc000c42230, 0x1440600, 0x14617e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*SchemaOrBool).UnmarshalJSON(0xc000c42230, 0xc000c62000, 0x7b5, 0x7b5, 0xc000c42230, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:640 +0x5b
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c222d0, 0xc000c2e000, 0x819f, 0x819f, 0x146, 0xc000c42230, 0x806a, 0x145, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.(*ptrDecoder).decode(0xc000c3c900, 0xc000c2e000, 0x819f, 0x819f, 0x146, 0xc000c16278, 0xc000c3c940, 0x0, 0x0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go:79 +0x398
github.com/goccy/go-json.(*structDecoder).decode(0xc000c46000, 0xc000c2e000, 0x819f, 0x819f, 0x0, 0xc000c161e0, 0xc000c161e0, 0xc000c16000, 0x1e0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go:652 +0x3eb
github.com/goccy/go-json.unmarshal(0xc000c24000, 0x819e, 0x819e, 0x1423a60, 0xc000c161e0, 0x100c28c, 0x17110a0)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.(*Schema).UnmarshalJSON(0xc000c16000, 0xc000c24000, 0x819e, 0x819e, 0xc000c16000, 0x0)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities.go:545 +0xbe
github.com/goccy/go-json.(*unmarshalJSONDecoder).decode(0xc000c22000, 0xc000c18000, 0x819f, 0x819f, 0x0, 0xc000c16000, 0x100fb58, 0x1e0, 0x1481620)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go:67 +0x1a2
github.com/goccy/go-json.unmarshal(0xc000c04000, 0x819e, 0x819e, 0x147fde0, 0xc000c16000, 0x40, 0xc000a0ee00)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/decode.go:48 +0xfb
github.com/goccy/go-json.Unmarshal(...)
	/Users/viacheslavpoturaev/go/pkg/mod/github.com/goccy/[email protected]/json.go:265
github.com/swaggest/jsonschema-go.TestSchema_MarshalJSON_roundtrip(0xc000a08300)
	/Users/viacheslavpoturaev/gohack/github.com/swaggest/jsonschema-go/entities_test.go:19 +0xce
testing.tRunner(0xc000a08300, 0x14bbd30)
	/Users/viacheslavpoturaev/sdk/go1.16beta1/src/testing/testing.go:1194 +0xef
created by testing.(*T).Run
	/Users/viacheslavpoturaev/sdk/go1.16beta1/src/testing/testing.go:1239 +0x2b3

Decoder cannot parse [{}] to interface{}

Description

This library cannot parse [{}] to an interface{} while encoding/json can.

How to reproduce

Run the following code.

package main

import (
	"fmt"
	"log"
	"strings"

	// "encoding/json"
	"github.com/goccy/go-json"
)

func main() {
	var v interface{}
	const src = `[{}]`

	if err := json.Unmarshal([]byte(src), &v); err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%#v\n", v)

	dec := json.NewDecoder(strings.NewReader(src))
	if err := dec.Decode(&v); err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%#v\n", v)
}

What I get

[]interface {}{map[string]interface {}{}}
2020/12/26 13:56:03 json: slice unexpected end of JSON input

What I expect

[]interface {}{map[string]interface {}{}}
[]interface {}{map[string]interface {}{}}

just like encoding/json does.

Environment

  • Go 1.15.6
  • go-json 0.1.16

fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

Using github.com/lestrrat-go/jwx@c832c23d.

Apply this patch to enable github.com/goccy/go-json:

diff --git a/bench/go.sum b/bench/go.sum
index 676336a..e406d8e 100644
--- a/bench/go.sum
+++ b/bench/go.sum
@@ -1,5 +1,7 @@
 github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/goccy/go-json v0.3.3 h1:RZzwBhoSY5uxu4OClZ3caMc0JFr9ubEz1v0HJp5sL4A=
+github.com/goccy/go-json v0.3.3/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
 github.com/lestrrat-go/backoff/v2 v2.0.4 h1:vXL7jlZboi/vvJQs41ZSmkKWUmnnO1obkUsctdPupDg=
 github.com/lestrrat-go/backoff/v2 v2.0.4/go.mod h1:mU93bMXuG27/Y5erI5E9weqavpTX5qiVFZI4uXAX0xk=
 github.com/lestrrat-go/codegen v0.0.0-20210115164254-686308008f83/go.mod h1:SGL1VXENaMr0dLvl58itf0mf0zurpKkhLj7zChlGnt8=
diff --git a/examples/go.sum b/examples/go.sum
index 68d3112..aec237f 100644
--- a/examples/go.sum
+++ b/examples/go.sum
@@ -2,6 +2,8 @@ github.com/cloudflare/circl v1.0.1-0.20210104183656-96a0695de3c3 h1:tpTW2GMi0DOd
 github.com/cloudflare/circl v1.0.1-0.20210104183656-96a0695de3c3/go.mod h1:l2CvGr3DNS9Egif8pwQqJ45Ci9Y/PPs0XJHTcRKbGBQ=
 github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/goccy/go-json v0.3.3 h1:RZzwBhoSY5uxu4OClZ3caMc0JFr9ubEz1v0HJp5sL4A=
+github.com/goccy/go-json v0.3.3/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
 github.com/lestrrat-go/backoff/v2 v2.0.4 h1:vXL7jlZboi/vvJQs41ZSmkKWUmnnO1obkUsctdPupDg=
 github.com/lestrrat-go/backoff/v2 v2.0.4/go.mod h1:mU93bMXuG27/Y5erI5E9weqavpTX5qiVFZI4uXAX0xk=
 github.com/lestrrat-go/codegen v0.0.0-20210115164254-686308008f83/go.mod h1:SGL1VXENaMr0dLvl58itf0mf0zurpKkhLj7zChlGnt8=
diff --git a/go.mod b/go.mod
index 2dc6cdb..3030096 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,7 @@ module github.com/lestrrat-go/jwx
 go 1.13
 
 require (
+       github.com/goccy/go-json v0.3.3
        github.com/lestrrat-go/backoff/v2 v2.0.4
        github.com/lestrrat-go/codegen v0.0.0-20210115164254-686308008f83
        github.com/lestrrat-go/httpcc v0.0.0-20210101035852-e7e8fea419e3
diff --git a/go.sum b/go.sum
index 308c3c0..6548592 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
 github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/goccy/go-json v0.3.3 h1:RZzwBhoSY5uxu4OClZ3caMc0JFr9ubEz1v0HJp5sL4A=
+github.com/goccy/go-json v0.3.3/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
 github.com/lestrrat-go/backoff/v2 v2.0.4 h1:vXL7jlZboi/vvJQs41ZSmkKWUmnnO1obkUsctdPupDg=
 github.com/lestrrat-go/backoff/v2 v2.0.4/go.mod h1:mU93bMXuG27/Y5erI5E9weqavpTX5qiVFZI4uXAX0xk=
 github.com/lestrrat-go/codegen v0.0.0-20210115164254-686308008f83 h1:nmWQCL26yQpPLefEtuB0k7g9d41Z1YspdzRd35gdpyo=
diff --git a/internal/json/json.go b/internal/json/json.go
index aefab49..194e52c 100644
--- a/internal/json/json.go
+++ b/internal/json/json.go
@@ -2,10 +2,10 @@ package json
 
 import (
        "bytes"
-       "encoding/json"
        "io"
        "sync"
 
+       "github.com/goccy/go-json"
        "github.com/lestrrat-go/jwx/internal/base64"
        "github.com/pkg/errors"
 )

Then when I run this test, I get an error

(Note, sometimes -count=10 is not enough, so you may need to run the tests multiple times)

% cd jwk
% go test -count=10 -race -run=Refresh
runtime: pointer 0xc000573930 to unallocated span span.base()=0xc00056c000 span.limit=0xc000574000 span.state=0
fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)

goroutine 447 [running]:
runtime.throw(0x100b4a916, 0x3e)
	/usr/local/go/src/runtime/panic.go:1112 +0x54 fp=0xc000443b10 sp=0xc000443ae0 pc=0x10046ff34
runtime.badPointer(0x128f785e0, 0xc000573930, 0x0, 0x0)
	/usr/local/go/src/runtime/mbitmap.go:351 +0x1fc fp=0xc000443b60 sp=0xc000443b10 pc=0x10044f5dc
runtime.findObject(0xc000573930, 0x0, 0x0, 0x1005202cc, 0xc000443c57, 0x1)
	/usr/local/go/src/runtime/mbitmap.go:387 +0x8c fp=0xc000443ba0 sp=0xc000443b60 pc=0x10044f67c
runtime.checkptrBase(0xc000573930, 0x1004a8898)
	/usr/local/go/src/runtime/checkptr.go:68 +0x44 fp=0xc000443be0 sp=0xc000443ba0 pc=0x100441cf4
runtime.checkptrAlignment(0xc000573930, 0x100c4c3e0, 0x1)
	/usr/local/go/src/runtime/checkptr.go:19 +0x6c fp=0xc000443c10 sp=0xc000443be0 pc=0x100441b3c
reflect.Value.IsNil(0x100c58420, 0xc000573930, 0x94, 0xc000573930)
	/usr/local/go/src/reflect/value.go:1084 +0xf0 fp=0xc000443c60 sp=0xc000443c10 pc=0x10051b810
github.com/goccy/go-json.(*Encoder).runEscaped(0xc00017e000, 0xc00038e140, 0xc00014e800, 0x7, 0x400, 0xc0003e4870, 0xc000573518, 0x100451c9c, 0xc0005735c8, 0x100448010, ...)
	/Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/encode_vm_escaped.go:174 +0x79c fp=0xc00044b4b0 sp=0xc000443c60 pc=0x10076363c
github.com/goccy/go-json.(*Encoder).encode(0xc00017e000, 0xc0005737d0, 0x0, 0x0, 0x100cb27c0, 0x100cceec0, 0x1, 0xc00017e000)
	/Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/encode.go:209 +0x5dc fp=0xc00044b730 sp=0xc00044b4b0 pc=0x10069d32c
github.com/goccy/go-json.(*Encoder).EncodeWithOption(0xc00017e000, 0x100c600e0, 0xc00044b878, 0x0, 0x0, 0x0, 0xc0005737b8, 0x1004debac)
	/Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/encode.go:115 +0xec fp=0xc00044b7c0 sp=0xc00044b730 pc=0x10069c93c
github.com/goccy/go-json.(*Encoder).Encode(...)
	/Users/lestrrat/dev/pkg/mod/github.com/goccy/[email protected]/encode.go:104
github.com/lestrrat-go/jwx/jwk_test.TestAutoRefresh.func1.1(0x100ce0420, 0xc0003ac380, 0xc0004b0600)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh_test.go:74 +0x504 fp=0xc00044b9c0 sp=0xc00044b7c0 pc=0x100b16894
net/http.HandlerFunc.ServeHTTP(0xc000113680, 0x100ce0420, 0xc0003ac380, 0xc0004b0600)
	/usr/local/go/src/net/http/server.go:2069 +0x44 fp=0xc00044b9f0 sp=0xc00044b9c0 pc=0x100a60f34
net/http.serverHandler.ServeHTTP(0xc0002c8380, 0x100ce0420, 0xc0003ac380, 0xc0004b0600)
	/usr/local/go/src/net/http/server.go:2887 +0xa4 fp=0xc00044ba50 sp=0xc00044b9f0 pc=0x100a63d74
net/http.(*conn).serve(0xc000150be0, 0x100ce1260, 0xc000242ac0)
	/usr/local/go/src/net/http/server.go:1952 +0x64c fp=0xc00044bfc0 sp=0xc00044ba50 pc=0x100a5f59c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00044bfc0 sp=0xc00044bfc0 pc=0x1004a7f74
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3013 +0x4d0

goroutine 1 [chan receive]:
runtime.gopark(0x100cd0670, 0xc0000a2b98, 0xc00025170e, 0x2)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000255820 sp=0xc000255800 pc=0x1004727e0
runtime.chanrecv(0xc0000a2b40, 0x0, 0xc000255801, 0x100553a84)
	/usr/local/go/src/runtime/chan.go:576 +0x244 fp=0xc0002558d0 sp=0xc000255820 pc=0x1004410b4
runtime.chanrecv1(0xc0000a2b40, 0x0)
	/usr/local/go/src/runtime/chan.go:439 +0x28 fp=0xc000255900 sp=0xc0002558d0 pc=0x100440e18
testing.tRunner.func1(0xc000083c80)
	/usr/local/go/src/testing/testing.go:1160 +0x278 fp=0xc000255a90 sp=0xc000255900 pc=0x100553a98
testing.tRunner(0xc000083c80, 0xc000255cb8)
	/usr/local/go/src/testing/testing.go:1198 +0x194 fp=0xc000255b90 sp=0xc000255a90 pc=0x10054df24
testing.runTests(0xc00012c180, 0x100f7ba00, 0x12, 0x12, 0xbffad4139c4e42f8, 0x8bb2e87d8c, 0x100f8c9c0, 0x100448010)
	/usr/local/go/src/testing/testing.go:1510 +0x508 fp=0xc000255ce0 sp=0xc000255b90 pc=0x100550128
testing.(*M).Run(0xc000192080, 0x0)
	/usr/local/go/src/testing/testing.go:1418 +0x2d4 fp=0xc000255ee0 sp=0xc000255ce0 pc=0x10054ec64
main.main()
	_testmain.go:79 +0x224 fp=0xc000255f70 sp=0xc000255ee0 pc=0x100b1ce84
runtime.main()
	/usr/local/go/src/runtime/proc.go:225 +0x26c fp=0xc000255fd0 sp=0xc000255f70 pc=0x1004723dc
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000255fd0 sp=0xc000255fd0 pc=0x1004a7f74

goroutine 2 [force gc (idle)]:
runtime.gopark(0x100cd0970, 0x100f8bf40, 0x1411, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00004afa0 sp=0xc00004af80 pc=0x1004727e0
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:342
runtime.forcegchelper()
	/usr/local/go/src/runtime/proc.go:276 +0xbc fp=0xc00004afd0 sp=0xc00004afa0 pc=0x10047266c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00004afd0 sp=0xc00004afd0 pc=0x1004a7f74
created by runtime.init.6
	/usr/local/go/src/runtime/proc.go:264 +0x30

goroutine 18 [GC sweep wait]:
runtime.gopark(0x100cd0970, 0x100f8c120, 0x140c, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0000467a0 sp=0xc000046780 pc=0x1004727e0
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:342
runtime.bgsweep(0xc00008e000)
	/usr/local/go/src/runtime/mgcsweep.go:182 +0x188 fp=0xc0000467d0 sp=0xc0000467a0 pc=0x10045dbf8
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0000467d0 sp=0xc0000467d0 pc=0x1004a7f74
created by runtime.gcenable
	/usr/local/go/src/runtime/mgc.go:217 +0x54

goroutine 19 [GC scavenge wait]:
runtime.gopark(0x100cd0970, 0x100f8c4c0, 0x140d, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000046f70 sp=0xc000046f50 pc=0x1004727e0
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:342
runtime.bgscavenge(0xc00008e000)
	/usr/local/go/src/runtime/mgcscavenge.go:314 +0x280 fp=0xc000046fd0 sp=0xc000046f70 pc=0x10045c0d0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000046fd0 sp=0xc000046fd0 pc=0x1004a7f74
created by runtime.gcenable
	/usr/local/go/src/runtime/mgc.go:218 +0x74

goroutine 34 [finalizer wait]:
runtime.gopark(0x100cd0970, 0x100fbb0e8, 0x1410, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00013c730 sp=0xc00013c710 pc=0x1004727e0
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:342
runtime.runfinq()
	/usr/local/go/src/runtime/mfinal.go:175 +0xb8 fp=0xc00013c7d0 sp=0xc00013c730 pc=0x100453638
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00013c7d0 sp=0xc00013c7d0 pc=0x1004a7f74
created by runtime.createfing
	/usr/local/go/src/runtime/mfinal.go:156 +0x78

goroutine 489 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee0e68, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00019bc00 sp=0xc00019bbe0 pc=0x1004727e0
runtime.netpollblock(0x128ee0e40, 0x72, 0xc00019bc68)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc00019bc40 sp=0xc00019bc00 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee0e40, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc00019bc70 sp=0xc00019bc40 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc000192818, 0x72, 0x0, 0x1, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc00019bcc0 sp=0xc00019bc70 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000192800, 0xc00007fa81, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc00019bdb0 sp=0xc00019bcc0 pc=0x1004df6c4
net.(*netFD).Read(0xc000192800, 0xc00007fa81, 0x1, 0x1, 0xc00019be68, 0x100a7a574, 0x0)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc00019be30 sp=0xc00019bdb0 pc=0x100638bb8
net.(*conn).Read(0xc0000100e8, 0xc00007fa81, 0x1, 0x1, 0x0, 0x0, 0xc00019bf38)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc00019bef0 sp=0xc00019be30 pc=0x100646ec8
net.(*TCPConn).Read(0xc0000100e8, 0xc00007fa81, 0x1, 0x1, 0x0, 0x0, 0x0)
	<autogenerated>:1 +0x50 fp=0xc00019bf50 sp=0xc00019bef0 pc=0x10065aa00
net/http.(*connReader).backgroundRead(0xc00007fa70)
	/usr/local/go/src/net/http/server.go:692 +0x7c fp=0xc00019bfd0 sp=0xc00019bf50 pc=0x100a5751c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00019bfd0 sp=0xc00019bfd0 pc=0x1004a7f74
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:688 +0x12c

goroutine 25 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc000180500, 0xc000201418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00004c740 sp=0xc00004c720 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00004c7d0 sp=0xc00004c740 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00004c7d0 sp=0xc00004c7d0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 26 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc000180520, 0xc000091418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00004a740 sp=0xc00004a720 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00004a7d0 sp=0xc00004a740 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00004a7d0 sp=0xc00004a7d0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 424 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0004becd0 sp=0xc0004becb0 pc=0x1004727e0
runtime.selectgo(0xc0004befa8, 0xc0004bee98, 0xc0004beea0, 0x0, 0x2, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc0004bee20 sp=0xc0004becd0 pc=0x100484de0
net/http.(*persistConn).writeLoop(0xc00000c7e0)
	/usr/local/go/src/net/http/transport.go:2382 +0x114 fp=0xc0004befd0 sp=0xc0004bee20 pc=0x100a818c4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0004befd0 sp=0xc0004befd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1744 +0xae0

goroutine 16 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc000094d40, 0xc000131418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00013cf40 sp=0xc00013cf20 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00013cfd0 sp=0xc00013cf40 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00013cfd0 sp=0xc00013cfd0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 48 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc0003dd160, 0x1418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00004b740 sp=0xc00004b720 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00004b7d0 sp=0xc00004b740 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00004b7d0 sp=0xc00004b7d0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 27 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc0003dd180, 0x1418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000047740 sp=0xc000047720 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc0000477d0 sp=0xc000047740 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0000477d0 sp=0xc0000477d0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 49 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc000180540, 0x1418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00013d740 sp=0xc00013d720 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00013d7d0 sp=0xc00013d740 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00013d7d0 sp=0xc00013d7d0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 50 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc000094d20, 0x1418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00013df40 sp=0xc00013df20 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00013dfd0 sp=0xc00013df40 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00013dfd0 sp=0xc00013dfd0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 66 [GC worker (idle)]:
runtime.gopark(0x100cd0718, 0xc000180560, 0xc000131418, 0x0)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00004cf40 sp=0xc00004cf20 pc=0x1004727e0
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1911 +0xe4 fp=0xc00004cfd0 sp=0xc00004cf40 pc=0x100456fd4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00004cfd0 sp=0xc00004cfd0 pc=0x1004a7f74
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1835 +0x34

goroutine 457 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000258c10 sp=0xc000258bf0 pc=0x1004727e0
runtime.selectgo(0xc000259078, 0xc000258de8, 0xc000258e00, 0x0, 0x6, 0x100a79501, 0x5, 0x100a8ae01)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc000258d60 sp=0xc000258c10 pc=0x100484de0
net/http.(*persistConn).roundTrip(0xc00000c7e0, 0xc000168240, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/transport.go:2610 +0x638 fp=0xc0002590e0 sp=0xc000258d60 pc=0x100a82518
net/http.(*Transport).roundTrip(0x100f7b700, 0xc0005da200, 0x0, 0x0, 0xc000477498)
	/usr/local/go/src/net/http/transport.go:592 +0xa74 fp=0xc000259460 sp=0xc0002590e0 pc=0x100a73d14
net/http.(*Transport).RoundTrip(0x100f7b700, 0xc0005da200, 0x100f7b700, 0x0, 0x0)
	/usr/local/go/src/net/http/roundtrip.go:17 +0x34 fp=0xc0002594b0 sp=0xc000259460 pc=0x100a559c4
net/http.send(0xc0005da200, 0x100cd9e58, 0x100f7b700, 0x0, 0x0, 0x0, 0xc00052c030, 0x0, 0xc000477828, 0x100a11728)
	/usr/local/go/src/net/http/client.go:251 +0x4f4 fp=0xc000259770 sp=0xc0002594b0 pc=0x100a0f794
net/http.(*Client).send(0x100f8c540, 0xc0005da200, 0x0, 0x0, 0x0, 0xc00052c030, 0x0, 0x1, 0xc000477918)
	/usr/local/go/src/net/http/client.go:175 +0x14c fp=0xc000259830 sp=0xc000259770 pc=0x100a0f02c
net/http.(*Client).do(0x100f8c540, 0xc0005da200, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/client.go:717 +0x1d4 fp=0xc000259bb0 sp=0xc000259830 pc=0x100a11414
net/http.(*Client).Do(...)
	/usr/local/go/src/net/http/client.go:585
github.com/lestrrat-go/jwx/jwk.fetch(0x100ce1228, 0xc0005926c0, 0xc00028e2b8, 0x16, 0xc000280040, 0x2, 0x2, 0x2, 0x100f309e8, 0x0)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/jwk.go:237 +0x1f8 fp=0xc000259cb0 sp=0xc000259bb0 pc=0x100ab7d08
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).doRefreshRequest(0xc000592720, 0x100ce1228, 0xc0005926c0, 0xc00028e2b8, 0x16, 0x1004a7f01, 0x0, 0x0)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:445 +0x200 fp=0xc000259f60 sp=0xc000259cb0 pc=0x100acb350
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop.func1(0xc000592720, 0x100ce1228, 0xc0005926c0, 0xc0000e0600)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:421 +0x6c fp=0xc000259fb0 sp=0xc000259f60 pc=0x100ae60dc
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000259fb0 sp=0xc000259fb0 pc=0x1004a7f74
created by github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:419 +0x930

goroutine 407 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0004748a0 sp=0xc000474880 pc=0x1004727e0
runtime.selectgo(0xc000030280, 0xc0002881a0, 0xc0003dc220, 0x0, 0x4, 0x1, 0x18, 0x101c45878)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc0004749f0 sp=0xc0004748a0 pc=0x100484de0
reflect.rselect(0xc000474c28, 0x4, 0x4, 0x3, 0x1)
	/usr/local/go/src/runtime/select.go:573 +0x29c fp=0xc000474ab0 sp=0xc0004749f0 pc=0x1004a3ffc
reflect.Select(0xc0002c8700, 0x4, 0x4, 0xc000474f10, 0x3, 0x3, 0x99, 0xbab065f0d5d1bb01)
	/usr/local/go/src/reflect/value.go:2264 +0x144 fp=0xc000474cb0 sp=0xc000474ab0 pc=0x10051f4b4
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop(0xc000592720, 0x100ce1228, 0xc0005926c0)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:373 +0x5f0 fp=0xc000474fc0 sp=0xc000474cb0 pc=0x100acaa40
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000474fc0 sp=0xc000474fc0 pc=0x1004a7f74
created by github.com/lestrrat-go/jwx/jwk.NewAutoRefresh
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:117 +0x1cc

goroutine 401 [chan receive]:
runtime.gopark(0x100cd0670, 0xc0000a2a78, 0x100a3170e, 0x2)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000460ed0 sp=0xc000460eb0 pc=0x1004727e0
runtime.chanrecv(0xc0000a2a20, 0x0, 0xc000460f01, 0x100553f44)
	/usr/local/go/src/runtime/chan.go:576 +0x244 fp=0xc000460f80 sp=0xc000460ed0 pc=0x1004410b4
runtime.chanrecv1(0xc0000a2a20, 0x0)
	/usr/local/go/src/runtime/chan.go:439 +0x28 fp=0xc000460fb0 sp=0xc000460f80 pc=0x100440e18
testing.runTests.func1.1(0xc000083c80)
	/usr/local/go/src/testing/testing.go:1517 +0x48 fp=0xc000460fd0 sp=0xc000460fb0 pc=0x100553f58
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000460fd0 sp=0xc000460fd0 pc=0x1004a7f74
created by testing.runTests.func1
	/usr/local/go/src/testing/testing.go:1517 +0xc8

goroutine 420 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00047a8a0 sp=0xc00047a880 pc=0x1004727e0
runtime.selectgo(0xc000168100, 0xc000026070, 0xc000094060, 0x0, 0x4, 0x1, 0x18, 0x101c44108)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc00047a9f0 sp=0xc00047a8a0 pc=0x100484de0
reflect.rselect(0xc00047ac28, 0x4, 0x4, 0x3, 0x1)
	/usr/local/go/src/runtime/select.go:573 +0x29c fp=0xc00047aab0 sp=0xc00047a9f0 pc=0x1004a3ffc
reflect.Select(0xc0003ac8c0, 0x4, 0x4, 0xc00047af10, 0x3, 0x3, 0x99, 0xc000048501)
	/usr/local/go/src/reflect/value.go:2264 +0x144 fp=0xc00047acb0 sp=0xc00047aab0 pc=0x10051f4b4
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop(0xc000544960, 0x100ce1228, 0xc000544900)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:373 +0x5f0 fp=0xc00047afc0 sp=0xc00047acb0 pc=0x100acaa40
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00047afc0 sp=0xc00047afc0 pc=0x1004a7f74
created by github.com/lestrrat-go/jwx/jwk.NewAutoRefresh
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:117 +0x1cc

goroutine 488 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005d4c10 sp=0xc0005d4bf0 pc=0x1004727e0
runtime.selectgo(0xc0005d5078, 0xc0005d4de8, 0xc0005d4e00, 0x0, 0x6, 0x100a79501, 0x5, 0x100a8ae01)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc0005d4d60 sp=0xc0005d4c10 pc=0x100484de0
net/http.(*persistConn).roundTrip(0xc000566120, 0xc000358240, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/transport.go:2610 +0x638 fp=0xc0005d50e0 sp=0xc0005d4d60 pc=0x100a82518
net/http.(*Transport).roundTrip(0x100f7b700, 0xc000218100, 0x0, 0x0, 0xc0005a9498)
	/usr/local/go/src/net/http/transport.go:592 +0xa74 fp=0xc0005d5460 sp=0xc0005d50e0 pc=0x100a73d14
net/http.(*Transport).RoundTrip(0x100f7b700, 0xc000218100, 0x100f7b700, 0x0, 0x0)
	/usr/local/go/src/net/http/roundtrip.go:17 +0x34 fp=0xc0005d54b0 sp=0xc0005d5460 pc=0x100a559c4
net/http.send(0xc000218100, 0x100cd9e58, 0x100f7b700, 0x0, 0x0, 0x0, 0xc0001c2050, 0x0, 0xc0005a9828, 0x100a11728)
	/usr/local/go/src/net/http/client.go:251 +0x4f4 fp=0xc0005d5770 sp=0xc0005d54b0 pc=0x100a0f794
net/http.(*Client).send(0x100f8c540, 0xc000218100, 0x0, 0x0, 0x0, 0xc0001c2050, 0x0, 0x1, 0xc0005a9918)
	/usr/local/go/src/net/http/client.go:175 +0x14c fp=0xc0005d5830 sp=0xc0005d5770 pc=0x100a0f02c
net/http.(*Client).do(0x100f8c540, 0xc000218100, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/client.go:717 +0x1d4 fp=0xc0005d5bb0 sp=0xc0005d5830 pc=0x100a11414
net/http.(*Client).Do(...)
	/usr/local/go/src/net/http/client.go:585
github.com/lestrrat-go/jwx/jwk.fetch(0x100ce1228, 0xc0005a2420, 0xc00054c438, 0x16, 0xc00037e160, 0x2, 0x2, 0x2, 0x100f309e8, 0x3)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/jwk.go:237 +0x1f8 fp=0xc0005d5cb0 sp=0xc0005d5bb0 pc=0x100ab7d08
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).doRefreshRequest(0xc0005a2540, 0x100ce1228, 0xc0005a2420, 0xc00054c438, 0x16, 0x1004a7f01, 0x0, 0x0)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:445 +0x200 fp=0xc0005d5f60 sp=0xc0005d5cb0 pc=0x100acb350
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop.func1(0xc0005a2540, 0x100ce1228, 0xc0005a2420, 0xc000192680)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:421 +0x6c fp=0xc0005d5fb0 sp=0xc0005d5f60 pc=0x100ae60dc
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005d5fb0 sp=0xc0005d5fb0 pc=0x1004a7f74
created by github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:419 +0x930

goroutine 415 [runnable]:
net.(*Dialer).DialContext-fm(0x100ce1228, 0xc000544900, 0x100b1daad, 0x3, 0xc0002620c0, 0xf, 0x100fbb210, 0x0, 0x0, 0x1004a8898)
	/usr/local/go/src/net/dial.go:369 +0xc4 fp=0xc000471710 sp=0xc000471710 pc=0x100a91894
net/http.(*Transport).dial(0x100f7b700, 0x100ce1228, 0xc000544900, 0x100b1daad, 0x3, 0xc0002620c0, 0xf, 0x0, 0xc000471940, 0xc000471930, ...)
	/usr/local/go/src/net/http/transport.go:1162 +0x23c fp=0xc0004717d0 sp=0xc000471710 pc=0x100a7872c
net/http.(*Transport).dialConn(0x100f7b700, 0x100ce1228, 0xc000544900, 0x0, 0xc0001be3a8, 0x4, 0xc0002620c0, 0xf, 0x0, 0xc0000f0000, ...)
	/usr/local/go/src/net/http/transport.go:1600 +0x2160 fp=0xc000471e70 sp=0xc0004717d0 pc=0x100a7d690
net/http.(*Transport).dialConnFor(0x100f7b700, 0xc0006c40b0)
	/usr/local/go/src/net/http/transport.go:1442 +0xe8 fp=0xc000471fc0 sp=0xc000471e70 pc=0x100a7a5c8
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000471fc0 sp=0xc000471fc0 pc=0x1004a7f74
created by net/http.(*Transport).queueForDial
	/usr/local/go/src/net/http/transport.go:1411 +0x4dc

goroutine 319 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0002579a0 sp=0xc000257980 pc=0x1004727e0
runtime.selectgo(0xc000257f88, 0xc000257be0, 0xc000257c20, 0x0, 0x4, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc000257af0 sp=0xc0002579a0 pc=0x100484de0
net/http.(*persistConn).readLoop(0xc0000f0360)
	/usr/local/go/src/net/http/transport.go:2203 +0xaec fp=0xc000257fd0 sp=0xc000257af0 pc=0x100a7ff7c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000257fd0 sp=0xc000257fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1743 +0xac0

goroutine 451 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee0ac8, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005d35c0 sp=0xc0005d35a0 pc=0x1004727e0
runtime.netpollblock(0x128ee0aa0, 0x72, 0xc0005d3628)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc0005d3600 sp=0xc0005d35c0 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee0aa0, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc0005d3630 sp=0xc0005d3600 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc00056a118, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc0005d3680 sp=0xc0005d3630 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00056a100, 0xc00061c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc0005d3770 sp=0xc0005d3680 pc=0x1004df6c4
net.(*netFD).Read(0xc00056a100, 0xc00061c000, 0x1000, 0x1000, 0x0, 0x0, 0x100f7b700)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc0005d37f0 sp=0xc0005d3770 pc=0x100638bb8
net.(*conn).Read(0xc00061a018, 0xc00061c000, 0x1000, 0x1000, 0x116, 0xc000521380, 0xc0005d38f8)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc0005d38b0 sp=0xc0005d37f0 pc=0x100646ec8
net.(*TCPConn).Read(0xc00061a018, 0xc00061c000, 0x1000, 0x1000, 0x100f7b710, 0x0, 0xc0005d39a8)
	<autogenerated>:1 +0x50 fp=0xc0005d3910 sp=0xc0005d38b0 pc=0x10065aa00
net/http.(*persistConn).Read(0xc000566120, 0xc00061c000, 0x1000, 0x1000, 0x1, 0x0, 0xc0005d39f8)
	/usr/local/go/src/net/http/transport.go:1922 +0xa8 fp=0xc0005d39b0 sp=0xc0005d3910 pc=0x100a7e948
bufio.(*Reader).fill(0xc0002d4300)
	/usr/local/go/src/bufio/bufio.go:101 +0x13c fp=0xc0005d3a60 sp=0xc0005d39b0 pc=0x100554d3c
bufio.(*Reader).Peek(0xc0002d4300, 0x1, 0x0, 0x1, 0x4, 0x1, 0x3)
	/usr/local/go/src/bufio/bufio.go:139 +0x6c fp=0xc0005d3af0 sp=0xc0005d3a60 pc=0x1005550bc
net/http.(*persistConn).readLoop(0xc000566120)
	/usr/local/go/src/net/http/transport.go:2083 +0x20c fp=0xc0005d3fd0 sp=0xc0005d3af0 pc=0x100a7f69c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005d3fd0 sp=0xc0005d3fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1743 +0xac0

goroutine 452 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005a6cd0 sp=0xc0005a6cb0 pc=0x1004727e0
runtime.selectgo(0xc0005a6fa8, 0xc0005a6e98, 0xc0005a6ea0, 0x0, 0x2, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc0005a6e20 sp=0xc0005a6cd0 pc=0x100484de0
net/http.(*persistConn).writeLoop(0xc000566120)
	/usr/local/go/src/net/http/transport.go:2382 +0x114 fp=0xc0005a6fd0 sp=0xc0005a6e20 pc=0x100a818c4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005a6fd0 sp=0xc0005a6fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1744 +0xae0

goroutine 404 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee1208, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005d6e20 sp=0xc0005d6e00 pc=0x1004727e0
runtime.netpollblock(0x128ee11e0, 0x72, 0xc0005d6e88)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc0005d6e60 sp=0xc0005d6e20 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee11e0, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc0005d6e90 sp=0xc0005d6e60 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc0000e0498, 0x72, 0xf00, 0xfd8, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc0005d6ee0 sp=0xc0005d6e90 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0000e0480, 0xc0000ba000, 0xfd8, 0xfd8, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc0005d6fd0 sp=0xc0005d6ee0 pc=0x1004df6c4
net.(*netFD).Read(0xc0000e0480, 0xc0000ba000, 0xfd8, 0xfd8, 0xc0006024c0, 0xc, 0xc)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc0005d7050 sp=0xc0005d6fd0 pc=0x100638bb8
net.(*conn).Read(0xc000134040, 0xc0000ba000, 0xfd8, 0xfd8, 0x0, 0xc0006024cb, 0xc0005d7158)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc0005d7110 sp=0xc0005d7050 pc=0x100646ec8
net.(*TCPConn).Read(0xc000134040, 0xc0000ba000, 0xfd8, 0xfd8, 0xc0005d71a8, 0x100447db0, 0xc0005d7268)
	<autogenerated>:1 +0x50 fp=0xc0005d7170 sp=0xc0005d7110 pc=0x10065aa00
crypto/tls.(*atLeastReader).Read(0xc00000e4c8, 0xc0000ba000, 0xfd8, 0xfd8, 0x18, 0xc00000e4c8, 0xc00000e4c8)
	/usr/local/go/src/crypto/tls/conn.go:777 +0x80 fp=0xc0005d7200 sp=0xc0005d7170 pc=0x1009a0fb0
bytes.(*Buffer).ReadFrom(0xc0004b8278, 0x100cd98b8, 0xc00000e4c8, 0x100c68cc0, 0x100cb65a0, 0x128f20008)
	/usr/local/go/src/bytes/buffer.go:204 +0x110 fp=0xc0005d72a0 sp=0xc0005d7200 pc=0x10053d480
crypto/tls.(*Conn).readFromUntil(0xc0004b8000, 0x128f20008, 0xc000134040, 0x5, 0xc000134040, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:799 +0x198 fp=0xc0005d7330 sp=0xc0005d72a0 pc=0x1009a1388
crypto/tls.(*Conn).readRecordOrCCS(0xc0004b8000, 0x100ce1100, 0xc000130008, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:606 +0x31c fp=0xc0005d7850 sp=0xc0005d7330 pc=0x10099db6c
crypto/tls.(*Conn).readRecord(...)
	/usr/local/go/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).Read(0xc0004b8000, 0xc00021f000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:1277 +0x1a0 fp=0xc0005d7920 sp=0xc0005d7850 pc=0x1009a4be0
bufio.(*Reader).Read(0xc000592600, 0xc0002c8038, 0x9, 0x9, 0x11, 0x0, 0xc0005d7a58)
	/usr/local/go/src/bufio/bufio.go:227 +0x598 fp=0xc0005d7a10 sp=0xc0005d7920 pc=0x100555cb8
io.ReadAtLeast(0x100cd9778, 0xc000592600, 0xc0002c8038, 0x9, 0x9, 0x9, 0x1004094d4, 0x138b70008, 0xc0005d7ac8)
	/usr/local/go/src/io/io.go:328 +0x7c fp=0xc0005d7a70 sp=0xc0005d7a10 pc=0x1004da64c
io.ReadFull(...)
	/usr/local/go/src/io/io.go:347
net/http.http2readFrameHeader(0xc0002c8038, 0x9, 0x9, 0x100cd9778, 0xc000592600, 0x0, 0x0, 0xc00028e270, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:1477 +0x60 fp=0xc0005d7b20 sp=0xc0005d7a70 pc=0x100a198f0
net/http.(*http2Framer).ReadFrame(0xc0002c8000, 0xc00028e270, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:1735 +0xb4 fp=0xc0005d7c70 sp=0xc0005d7b20 pc=0x100a1a504
net/http.(*http2clientConnReadLoop).run(0xc0005d7fb8, 0x0, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:8322 +0x13c fp=0xc0005d7f00 sp=0xc0005d7c70 pc=0x100a4207c
net/http.(*http2ClientConn).readLoop(0xc00043a000)
	/usr/local/go/src/net/http/h2_bundle.go:8244 +0x70 fp=0xc0005d7fd0 sp=0xc0005d7f00 pc=0x100a415c0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005d7fd0 sp=0xc0005d7fd0 pc=0x1004a7f74
created by net/http.(*http2Transport).newClientConn
	/usr/local/go/src/net/http/h2_bundle.go:7208 +0x96c

goroutine 422 [running]:
	goroutine running on other thread; stack unavailable
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3013 +0x4d0

goroutine 419 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee1778, 0xc000051b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00005d950 sp=0xc00005d930 pc=0x1004727e0
runtime.netpollblock(0x128ee1750, 0x72, 0xc00005d9b8)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc00005d990 sp=0xc00005d950 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee1750, 0x72, 0x128ee1750)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc00005d9c0 sp=0xc00005d990 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc000568518, 0x72, 0x0, 0x0, 0x100b1e34f)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc00005da10 sp=0xc00005d9c0 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000568500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:401 +0x240 fp=0xc00005daf0 sp=0xc00005da10 pc=0x1004e0370
net.(*netFD).accept(0xc000568500, 0xc00004f200, 0xc00005dc58, 0x8)
	/usr/local/go/src/net/fd_unix.go:172 +0x38 fp=0xc00005dbf0 sp=0xc00005daf0 pc=0x100639d18
net.(*TCPListener).accept(0xc0002a0fc0, 0xc0002e4f50, 0x0, 0x101d5dd28)
	/usr/local/go/src/net/tcpsock_posix.go:139 +0x40 fp=0xc00005dc50 sp=0xc00005dbf0 pc=0x1006507d0
net.(*TCPListener).Accept(0xc0002a0fc0, 0x100a64490, 0xc00005dcf8, 0xc0001c2030, 0x1004a0a70)
	/usr/local/go/src/net/tcpsock.go:261 +0x70 fp=0xc00005dcd0 sp=0xc00005dc50 pc=0x10064ef30
net/http.(*onceCloseListener).Accept(0xc00052edb0, 0x100cd0250, 0xc00028a320, 0x100ce1260, 0xc00052ee70)
	<autogenerated>:1 +0x54 fp=0xc00005dd30 sp=0xc00005dcd0 pc=0x100a94884
net/http.(*Server).Serve(0xc0002909a0, 0x100ce0240, 0xc0002a0fc0, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:2981 +0x36c fp=0xc00005df40 sp=0xc00005dd30 pc=0x100a6432c
net/http/httptest.(*Server).goServe.func1(0xc0002e4f50)
	/usr/local/go/src/net/http/httptest/server.go:308 +0xa0 fp=0xc00005dfd0 sp=0xc00005df40 pc=0x100afaeb0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00005dfd0 sp=0xc00005dfd0 pc=0x1004a7f74
created by net/http/httptest.(*Server).goServe
	/usr/local/go/src/net/http/httptest/server.go:306 +0x5c

goroutine 486 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee14c0, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00046edd0 sp=0xc00046edb0 pc=0x1004727e0
runtime.netpollblock(0x128ee1498, 0x72, 0xc00046ee38)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc00046ee10 sp=0xc00046edd0 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee1498, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc00046ee40 sp=0xc00046ee10 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc0000e0118, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc00046ee90 sp=0xc00046ee40 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0000e0100, 0xc000484000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc00046ef80 sp=0xc00046ee90 pc=0x1004df6c4
net.(*netFD).Read(0xc0000e0100, 0xc000484000, 0x1000, 0x1000, 0xc00038e0a0, 0x28, 0xc00046f048)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc00046f000 sp=0xc00046ef80 pc=0x100638bb8
net.(*conn).Read(0xc0001c2030, 0xc000484000, 0x1000, 0x1000, 0xc00046f118, 0x100a57b80, 0xc000ad5be8)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc00046f0c0 sp=0xc00046f000 pc=0x100646ec8
net.(*TCPConn).Read(0xc0001c2030, 0xc000484000, 0x1000, 0x1000, 0xc00046f158, 0x1004d895c, 0xc00046f1b8)
	<autogenerated>:1 +0x50 fp=0xc00046f120 sp=0xc00046f0c0 pc=0x10065aa00
net/http.(*connReader).Read(0xc00007e060, 0xc000484000, 0x1000, 0x1000, 0x1, 0x0, 0xc0006c2060)
	/usr/local/go/src/net/http/server.go:800 +0x1b8 fp=0xc00046f1c0 sp=0xc00046f120 pc=0x100a57bd8
bufio.(*Reader).fill(0xc0002d4000)
	/usr/local/go/src/bufio/bufio.go:101 +0x13c fp=0xc00046f270 sp=0xc00046f1c0 pc=0x100554d3c
bufio.(*Reader).ReadSlice(0xc0002d4000, 0x10044800a, 0x0, 0x100c8e400, 0x1, 0xc0001b8000, 0x1297c0ff8)
	/usr/local/go/src/bufio/bufio.go:360 +0x60 fp=0xc00046f330 sp=0xc00046f270 pc=0x1005569c0
bufio.(*Reader).ReadLine(0xc0002d4000, 0x0, 0x0, 0xc00052e3c0, 0xc00046f408, 0x100447db0, 0xc00046f4c8)
	/usr/local/go/src/bufio/bufio.go:389 +0x34 fp=0xc00046f3d0 sp=0xc00046f330 pc=0x100556ec4
net/textproto.(*Reader).readLineSlice(0xc00052e3c0, 0xc0002c6200, 0xc00046f558, 0x1004de170, 0xc0000e0100, 0x8)
	/usr/local/go/src/net/textproto/reader.go:57 +0xf4 fp=0xc00046f500 sp=0xc00046f3d0 pc=0x1009e88c4
net/textproto.(*Reader).ReadLine(...)
	/usr/local/go/src/net/textproto/reader.go:38
net/http.readRequest(0xc0002d4000, 0x0, 0xc0002c6200, 0x0, 0x0)
	/usr/local/go/src/net/http/request.go:1027 +0x6c fp=0xc00046f740 sp=0xc00046f500 pc=0x100a52dac
net/http.(*conn).readRequest(0xc00028a320, 0x100ce11b8, 0xc000242000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:986 +0x25c fp=0xc00046fa50 sp=0xc00046f740 pc=0x100a595ac
net/http.(*conn).serve(0xc00028a320, 0x100ce1260, 0xc000242000)
	/usr/local/go/src/net/http/server.go:1878 +0x3b8 fp=0xc00046ffc0 sp=0xc00046fa50 pc=0x100a5f308
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00046ffc0 sp=0xc00046ffc0 pc=0x1004a7f74
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3013 +0x4d0

goroutine 406 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee15a8, 0xc0004b1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0004bc950 sp=0xc0004bc930 pc=0x1004727e0
runtime.netpollblock(0x128ee1580, 0x72, 0xc0004bc9b8)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc0004bc990 sp=0xc0004bc950 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee1580, 0x72, 0x128ee1580)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc0004bc9c0 sp=0xc0004bc990 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc0000e0598, 0x72, 0x0, 0x0, 0x100b1e34f)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc0004bca10 sp=0xc0004bc9c0 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc0000e0580, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:401 +0x240 fp=0xc0004bcaf0 sp=0xc0004bca10 pc=0x1004e0370
net.(*netFD).accept(0xc0000e0580, 0xc00051e000, 0xc0004bcc58, 0x8)
	/usr/local/go/src/net/fd_unix.go:172 +0x38 fp=0xc0004bcbf0 sp=0xc0004bcaf0 pc=0x100639d18
net.(*TCPListener).accept(0xc00000e510, 0xc00017e7e0, 0x0, 0x1014a8548)
	/usr/local/go/src/net/tcpsock_posix.go:139 +0x40 fp=0xc0004bcc50 sp=0xc0004bcbf0 pc=0x1006507d0
net.(*TCPListener).Accept(0xc00000e510, 0x100a64490, 0xc0004bccf8, 0xc0000100e8, 0x1004a0a70)
	/usr/local/go/src/net/tcpsock.go:261 +0x70 fp=0xc0004bccd0 sp=0xc0004bcc50 pc=0x10064ef30
net/http.(*onceCloseListener).Accept(0xc0000b8ed0, 0x100cd0250, 0xc000150be0, 0x100ce1260, 0xc0000b8f90)
	<autogenerated>:1 +0x54 fp=0xc0004bcd30 sp=0xc0004bccd0 pc=0x100a94884
net/http.(*Server).Serve(0xc0002c8380, 0x100ce0240, 0xc00000e510, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:2981 +0x36c fp=0xc0004bcf40 sp=0xc0004bcd30 pc=0x100a6432c
net/http/httptest.(*Server).goServe.func1(0xc00017e7e0)
	/usr/local/go/src/net/http/httptest/server.go:308 +0xa0 fp=0xc0004bcfd0 sp=0xc0004bcf40 pc=0x100afaeb0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0004bcfd0 sp=0xc0004bcfd0 pc=0x1004a7f74
created by net/http/httptest.(*Server).goServe
	/usr/local/go/src/net/http/httptest/server.go:306 +0x5c

goroutine 305 [chan receive]:
runtime.gopark(0x100cd0670, 0xc000102ef8, 0xc00047170e, 0x2)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000476c50 sp=0xc000476c30 pc=0x1004727e0
runtime.chanrecv(0xc000102ea0, 0x0, 0xc000476d01, 0x100553a84)
	/usr/local/go/src/runtime/chan.go:576 +0x244 fp=0xc000476d00 sp=0xc000476c50 pc=0x1004410b4
runtime.chanrecv1(0xc000102ea0, 0x0)
	/usr/local/go/src/runtime/chan.go:439 +0x28 fp=0xc000476d30 sp=0xc000476d00 pc=0x100440e18
testing.tRunner.func1(0xc000083e00)
	/usr/local/go/src/testing/testing.go:1160 +0x278 fp=0xc000476ec0 sp=0xc000476d30 pc=0x100553a98
testing.tRunner(0xc000083e00, 0x100ccff10)
	/usr/local/go/src/testing/testing.go:1198 +0x194 fp=0xc000476fc0 sp=0xc000476ec0 pc=0x10054df24
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000476fc0 sp=0xc000476fc0 pc=0x1004a7f74
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1239 +0x434

goroutine 389 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee0d80, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005d8e10 sp=0xc0005d8df0 pc=0x1004727e0
runtime.netpollblock(0x128ee0d58, 0x72, 0xc0005d8e78)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc0005d8e50 sp=0xc0005d8e10 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee0d58, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc0005d8e80 sp=0xc0005d8e50 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc0001c4118, 0x72, 0x1500, 0x1535, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc0005d8ed0 sp=0xc0005d8e80 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0001c4100, 0xc0001ec000, 0x1535, 0x1535, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc0005d8fc0 sp=0xc0005d8ed0 pc=0x1004df6c4
net.(*netFD).Read(0xc0001c4100, 0xc0001ec000, 0x1535, 0x1535, 0xc00037e980, 0xc, 0xc)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc0005d9040 sp=0xc0005d8fc0 pc=0x100638bb8
net.(*conn).Read(0xc0001c2000, 0xc0001ec000, 0x1535, 0x1535, 0x0, 0xc00037e98b, 0xc0005d9148)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc0005d9100 sp=0xc0005d9040 pc=0x100646ec8
net.(*TCPConn).Read(0xc0001c2000, 0xc0001ec000, 0x1535, 0x1535, 0xc0005d9198, 0x100447db0, 0xc0005d9258)
	<autogenerated>:1 +0x50 fp=0xc0005d9160 sp=0xc0005d9100 pc=0x10065aa00
crypto/tls.(*atLeastReader).Read(0xc00000e390, 0xc0001ec000, 0x1535, 0x1535, 0x18, 0xc00000e390, 0xc00000e390)
	/usr/local/go/src/crypto/tls/conn.go:777 +0x80 fp=0xc0005d91f0 sp=0xc0005d9160 pc=0x1009a0fb0
bytes.(*Buffer).ReadFrom(0xc000124278, 0x100cd98b8, 0xc00000e390, 0x100c68cc0, 0x100cb65a0, 0x128f20008)
	/usr/local/go/src/bytes/buffer.go:204 +0x110 fp=0xc0005d9290 sp=0xc0005d91f0 pc=0x10053d480
crypto/tls.(*Conn).readFromUntil(0xc000124000, 0x128f20008, 0xc0001c2000, 0x5, 0xc0001c2000, 0x20a)
	/usr/local/go/src/crypto/tls/conn.go:799 +0x198 fp=0xc0005d9320 sp=0xc0005d9290 pc=0x1009a1388
crypto/tls.(*Conn).readRecordOrCCS(0xc000124000, 0x100ce1100, 0xc000130008, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:606 +0x31c fp=0xc0005d9840 sp=0xc0005d9320 pc=0x10099db6c
crypto/tls.(*Conn).readRecord(...)
	/usr/local/go/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).Read(0xc000124000, 0xc0006f4000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:1277 +0x1a0 fp=0xc0005d9910 sp=0xc0005d9840 pc=0x1009a4be0
net/http.(*persistConn).Read(0xc00000c120, 0xc0006f4000, 0x1000, 0x1000, 0x1, 0x0, 0xc0005d99f8)
	/usr/local/go/src/net/http/transport.go:1922 +0xa8 fp=0xc0005d99b0 sp=0xc0005d9910 pc=0x100a7e948
bufio.(*Reader).fill(0xc0000f22a0)
	/usr/local/go/src/bufio/bufio.go:101 +0x13c fp=0xc0005d9a60 sp=0xc0005d99b0 pc=0x100554d3c
bufio.(*Reader).Peek(0xc0000f22a0, 0x1, 0x0, 0x1, 0x4, 0x1, 0x3)
	/usr/local/go/src/bufio/bufio.go:139 +0x6c fp=0xc0005d9af0 sp=0xc0005d9a60 pc=0x1005550bc
net/http.(*persistConn).readLoop(0xc00000c120)
	/usr/local/go/src/net/http/transport.go:2083 +0x20c fp=0xc0005d9fd0 sp=0xc0005d9af0 pc=0x100a7f69c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005d9fd0 sp=0xc0005d9fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1743 +0xac0

goroutine 390 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000479cd0 sp=0xc000479cb0 pc=0x1004727e0
runtime.selectgo(0xc000479fa8, 0xc000479e98, 0xc000479ea0, 0x0, 0x2, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc000479e20 sp=0xc000479cd0 pc=0x100484de0
net/http.(*persistConn).writeLoop(0xc00000c120)
	/usr/local/go/src/net/http/transport.go:2382 +0x114 fp=0xc000479fd0 sp=0xc000479e20 pc=0x100a818c4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000479fd0 sp=0xc000479fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1744 +0xae0

goroutine 421 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee0f50, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000562dd0 sp=0xc000562db0 pc=0x1004727e0
runtime.netpollblock(0x128ee0f28, 0x72, 0xc000562e38)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc000562e10 sp=0xc000562dd0 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee0f28, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc000562e40 sp=0xc000562e10 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc000568618, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc000562e90 sp=0xc000562e40 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000568600, 0xc0000bb000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc000562f80 sp=0xc000562e90 pc=0x1004df6c4
net.(*netFD).Read(0xc000568600, 0xc0000bb000, 0x1000, 0x1000, 0xc000563038, 0x1004a8898, 0xc000563048)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc000563000 sp=0xc000562f80 pc=0x100638bb8
net.(*conn).Read(0xc000134068, 0xc0000bb000, 0x1000, 0x1000, 0xc000563118, 0x100a57b80, 0xc000d80c08)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc0005630c0 sp=0xc000563000 pc=0x100646ec8
net.(*TCPConn).Read(0xc000134068, 0xc0000bb000, 0x1000, 0x1000, 0xc000563158, 0x1004d895c, 0xc0005631b8)
	<autogenerated>:1 +0x50 fp=0xc000563120 sp=0xc0005630c0 pc=0x10065aa00
net/http.(*connReader).Read(0xc000329080, 0xc0000bb000, 0x1000, 0x1000, 0x1, 0x0, 0xc0004562ff)
	/usr/local/go/src/net/http/server.go:800 +0x1b8 fp=0xc0005631c0 sp=0xc000563120 pc=0x100a57bd8
bufio.(*Reader).fill(0xc00030f7a0)
	/usr/local/go/src/bufio/bufio.go:101 +0x13c fp=0xc000563270 sp=0xc0005631c0 pc=0x100554d3c
bufio.(*Reader).ReadSlice(0xc00030f7a0, 0x10044800a, 0x0, 0x100fb62c0, 0xc0005633b8, 0x10044791c, 0x100fc0448)
	/usr/local/go/src/bufio/bufio.go:360 +0x60 fp=0xc000563330 sp=0xc000563270 pc=0x1005569c0
bufio.(*Reader).ReadLine(0xc00030f7a0, 0x0, 0x0, 0x101c520e8, 0xc000563408, 0x100447db0, 0xc0005634c8)
	/usr/local/go/src/bufio/bufio.go:389 +0x34 fp=0xc0005633d0 sp=0xc000563330 pc=0x100556ec4
net/textproto.(*Reader).readLineSlice(0xc0001148a0, 0xc000218000, 0xc000563558, 0x1004de170, 0xc000568600, 0x8)
	/usr/local/go/src/net/textproto/reader.go:57 +0xf4 fp=0xc000563500 sp=0xc0005633d0 pc=0x1009e88c4
net/textproto.(*Reader).ReadLine(...)
	/usr/local/go/src/net/textproto/reader.go:38
net/http.readRequest(0xc00030f7a0, 0x0, 0xc000218000, 0x0, 0x0)
	/usr/local/go/src/net/http/request.go:1027 +0x6c fp=0xc000563740 sp=0xc000563500 pc=0x100a52dac
net/http.(*conn).readRequest(0xc000376c80, 0x100ce11b8, 0xc0002ac740, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:986 +0x25c fp=0xc000563a50 sp=0xc000563740 pc=0x100a595ac
net/http.(*conn).serve(0xc000376c80, 0x100ce1260, 0xc0002ac740)
	/usr/local/go/src/net/http/server.go:1878 +0x3b8 fp=0xc000563fc0 sp=0xc000563a50 pc=0x100a5f308
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000563fc0 sp=0xc000563fc0 pc=0x1004a7f74
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3013 +0x4d0

goroutine 320 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00047bcd0 sp=0xc00047bcb0 pc=0x1004727e0
runtime.selectgo(0xc00047bfa8, 0xc00047be98, 0xc00047bea0, 0x0, 0x2, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc00047be20 sp=0xc00047bcd0 pc=0x100484de0
net/http.(*persistConn).writeLoop(0xc0000f0360)
	/usr/local/go/src/net/http/transport.go:2382 +0x114 fp=0xc00047bfd0 sp=0xc00047be20 pc=0x100a818c4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00047bfd0 sp=0xc00047bfd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1744 +0xae0

goroutine 499 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0002259a0 sp=0xc000225980 pc=0x1004727e0
runtime.selectgo(0xc000225f88, 0xc000225be0, 0xc000225c20, 0x0, 0x4, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc000225af0 sp=0xc0002259a0 pc=0x100484de0
net/http.(*persistConn).readLoop(0xc00015c120)
	/usr/local/go/src/net/http/transport.go:2203 +0xaec fp=0xc000225fd0 sp=0xc000225af0 pc=0x100a7ff7c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000225fd0 sp=0xc000225fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1743 +0xac0

goroutine 398 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee1038, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000252e20 sp=0xc000252e00 pc=0x1004727e0
runtime.netpollblock(0x128ee1010, 0x72, 0xc000252e88)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc000252e60 sp=0xc000252e20 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee1010, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc000252e90 sp=0xc000252e60 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc0001c4318, 0x72, 0xe00, 0xe6f, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc000252ee0 sp=0xc000252e90 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0001c4300, 0xc000485000, 0xe6f, 0xe6f, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc000252fd0 sp=0xc000252ee0 pc=0x1004df6c4
net.(*netFD).Read(0xc0001c4300, 0xc000485000, 0xe6f, 0xe6f, 0xc000280440, 0xc, 0xc)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc000253050 sp=0xc000252fd0 pc=0x100638bb8
net.(*conn).Read(0xc0001c2058, 0xc000485000, 0xe6f, 0xe6f, 0x0, 0xc00028044b, 0xc000253158)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc000253110 sp=0xc000253050 pc=0x100646ec8
net.(*TCPConn).Read(0xc0001c2058, 0xc000485000, 0xe6f, 0xe6f, 0xc0002531a8, 0x100447db0, 0xc000253268)
	<autogenerated>:1 +0x50 fp=0xc000253170 sp=0xc000253110 pc=0x10065aa00
crypto/tls.(*atLeastReader).Read(0xc0002baff0, 0xc000485000, 0xe6f, 0xe6f, 0x18, 0xc0002baff0, 0xc0002baff0)
	/usr/local/go/src/crypto/tls/conn.go:777 +0x80 fp=0xc000253200 sp=0xc000253170 pc=0x1009a0fb0
bytes.(*Buffer).ReadFrom(0xc000204278, 0x100cd98b8, 0xc0002baff0, 0x100c68cc0, 0x100cb65a0, 0x128f20008)
	/usr/local/go/src/bytes/buffer.go:204 +0x110 fp=0xc0002532a0 sp=0xc000253200 pc=0x10053d480
crypto/tls.(*Conn).readFromUntil(0xc000204000, 0x128f20008, 0xc0001c2058, 0x5, 0xc0001c2058, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:799 +0x198 fp=0xc000253330 sp=0xc0002532a0 pc=0x1009a1388
crypto/tls.(*Conn).readRecordOrCCS(0xc000204000, 0x100ce1100, 0xc000130008, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:606 +0x31c fp=0xc000253850 sp=0xc000253330 pc=0x10099db6c
crypto/tls.(*Conn).readRecord(...)
	/usr/local/go/src/crypto/tls/conn.go:574
crypto/tls.(*Conn).Read(0xc000204000, 0xc0000bd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/crypto/tls/conn.go:1277 +0x1a0 fp=0xc000253920 sp=0xc000253850 pc=0x1009a4be0
bufio.(*Reader).Read(0xc000137b00, 0xc00048e3b8, 0x9, 0x9, 0xc00020e300, 0x6, 0xc000253a58)
	/usr/local/go/src/bufio/bufio.go:227 +0x598 fp=0xc000253a10 sp=0xc000253920 pc=0x100555cb8
io.ReadAtLeast(0x100cd9778, 0xc000137b00, 0xc00048e3b8, 0x9, 0x9, 0x9, 0xc0001c106c, 0x1004a8d00, 0xc000253ac8)
	/usr/local/go/src/io/io.go:328 +0x7c fp=0xc000253a70 sp=0xc000253a10 pc=0x1004da64c
io.ReadFull(...)
	/usr/local/go/src/io/io.go:347
net/http.http2readFrameHeader(0xc00048e3b8, 0x9, 0x9, 0x100cd9778, 0xc000137b00, 0x0, 0x0, 0xc00054c3d8, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:1477 +0x60 fp=0xc000253b20 sp=0xc000253a70 pc=0x100a198f0
net/http.(*http2Framer).ReadFrame(0xc00048e380, 0xc00054c3d8, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:1735 +0xb4 fp=0xc000253c70 sp=0xc000253b20 pc=0x100a1a504
net/http.(*http2clientConnReadLoop).run(0xc000253fb8, 0x0, 0x0)
	/usr/local/go/src/net/http/h2_bundle.go:8322 +0x13c fp=0xc000253f00 sp=0xc000253c70 pc=0x100a4207c
net/http.(*http2ClientConn).readLoop(0xc0001c0f00)
	/usr/local/go/src/net/http/h2_bundle.go:8244 +0x70 fp=0xc000253fd0 sp=0xc000253f00 pc=0x100a415c0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000253fd0 sp=0xc000253fd0 pc=0x1004a7f74
created by net/http.(*http2Transport).newClientConn
	/usr/local/go/src/net/http/h2_bundle.go:7208 +0x96c

goroutine 434 [sleep]:
runtime.gopark(0x100cd0a58, 0xc000100190, 0x1313, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005a7cf0 sp=0xc0005a7cd0 pc=0x1004727e0
time.Sleep(0xee6b2800)
	/usr/local/go/src/runtime/time.go:193 +0xc4 fp=0xc0005a7d30 sp=0xc0005a7cf0 pc=0x1004a5154
github.com/lestrrat-go/jwx/jwk_test.TestAutoRefresh.func1(0xc0001c1200)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh_test.go:102 +0x3dc fp=0xc0005a7ec0 sp=0xc0005a7d30 pc=0x100b16f0c
testing.tRunner(0xc0001c1200, 0x100ccfef0)
	/usr/local/go/src/testing/testing.go:1194 +0x174 fp=0xc0005a7fc0 sp=0xc0005a7ec0 pc=0x10054df04
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005a7fc0 sp=0xc0005a7fc0 pc=0x1004a7f74
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1239 +0x434

goroutine 435 [sleep]:
runtime.gopark(0x100cd0a58, 0xc000363090, 0x1313, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000223cf0 sp=0xc000223cd0 pc=0x1004727e0
time.Sleep(0xee6b2800)
	/usr/local/go/src/runtime/time.go:193 +0xc4 fp=0xc000223d30 sp=0xc000223cf0 pc=0x1004a5154
github.com/lestrrat-go/jwx/jwk_test.TestAutoRefresh.func2(0xc0001c1380)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh_test.go:160 +0x3dc fp=0xc000223ec0 sp=0xc000223d30 pc=0x100b17c7c
testing.tRunner(0xc0001c1380, 0x100ccff00)
	/usr/local/go/src/testing/testing.go:1194 +0x174 fp=0xc000223fc0 sp=0xc000223ec0 pc=0x10054df04
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000223fc0 sp=0xc000223fc0 pc=0x1004a7f74
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1239 +0x434

goroutine 436 [sleep]:
runtime.gopark(0x100cd0a58, 0xc00038e910, 0x100c41313, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005a8cb0 sp=0xc0005a8c90 pc=0x1004727e0
time.Sleep(0x9502f900)
	/usr/local/go/src/runtime/time.go:193 +0xc4 fp=0xc0005a8cf0 sp=0xc0005a8cb0 pc=0x1004a5154
github.com/lestrrat-go/jwx/jwk_test.TestAutoRefresh.func3(0xc0001c1680)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh_test.go:222 +0x6ec fp=0xc0005a8ec0 sp=0xc0005a8cf0 pc=0x100b18b9c
testing.tRunner(0xc0001c1680, 0x100ccff08)
	/usr/local/go/src/testing/testing.go:1194 +0x174 fp=0xc0005a8fc0 sp=0xc0005a8ec0 pc=0x10054df04
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005a8fc0 sp=0xc0005a8fc0 pc=0x1004a7f74
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1239 +0x434

goroutine 437 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee12f0, 0xc0005a1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0005aa950 sp=0xc0005aa930 pc=0x1004727e0
runtime.netpollblock(0x128ee12c8, 0x72, 0xc0005aa9b8)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc0005aa990 sp=0xc0005aa950 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee12c8, 0x72, 0x128ee12c8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc0005aa9c0 sp=0xc0005aa990 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc000192618, 0x72, 0x0, 0x0, 0x100b1e34f)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc0005aaa10 sp=0xc0005aa9c0 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000192600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:401 +0x240 fp=0xc0005aaaf0 sp=0xc0005aaa10 pc=0x1004e0370
net.(*netFD).accept(0xc000192600, 0xc00051e480, 0xc0005aac58, 0x8)
	/usr/local/go/src/net/fd_unix.go:172 +0x38 fp=0xc0005aabf0 sp=0xc0005aaaf0 pc=0x100639d18
net.(*TCPListener).accept(0xc0002bb218, 0xc000480bd0, 0x0, 0x101499ed0)
	/usr/local/go/src/net/tcpsock_posix.go:139 +0x40 fp=0xc0005aac50 sp=0xc0005aabf0 pc=0x1006507d0
net.(*TCPListener).Accept(0xc0002bb218, 0x100a64490, 0xc0005aacf8, 0xc000134070, 0x1004a0a70)
	/usr/local/go/src/net/tcpsock.go:261 +0x70 fp=0xc0005aacd0 sp=0xc0005aac50 pc=0x10064ef30
net/http.(*onceCloseListener).Accept(0xc000096000, 0x100cd0250, 0xc000376d20, 0x100ce1260, 0xc0000960c0)
	<autogenerated>:1 +0x54 fp=0xc0005aad30 sp=0xc0005aacd0 pc=0x100a94884
net/http.(*Server).Serve(0xc00048e540, 0x100ce0240, 0xc0002bb218, 0x0, 0x0)
	/usr/local/go/src/net/http/server.go:2981 +0x36c fp=0xc0005aaf40 sp=0xc0005aad30 pc=0x100a6432c
net/http/httptest.(*Server).goServe.func1(0xc000480bd0)
	/usr/local/go/src/net/http/httptest/server.go:308 +0xa0 fp=0xc0005aafd0 sp=0xc0005aaf40 pc=0x100afaeb0
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0005aafd0 sp=0xc0005aafd0 pc=0x1004a7f74
created by net/http/httptest.(*Server).goServe
	/usr/local/go/src/net/http/httptest/server.go:306 +0x5c

goroutine 438 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc0004bd8a0 sp=0xc0004bd880 pc=0x1004727e0
runtime.selectgo(0xc000358200, 0xc00024e170, 0xc0001802c0, 0x0, 0x4, 0x1, 0x18, 0x101c445b8)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc0004bd9f0 sp=0xc0004bd8a0 pc=0x100484de0
reflect.rselect(0xc0004bdc28, 0x4, 0x4, 0x3, 0xc0004bda01)
	/usr/local/go/src/runtime/select.go:573 +0x29c fp=0xc0004bdab0 sp=0xc0004bd9f0 pc=0x1004a3ffc
reflect.Select(0xc00048e620, 0x4, 0x4, 0xc0004bdf10, 0x3, 0x3, 0x99, 0x100655901)
	/usr/local/go/src/reflect/value.go:2264 +0x144 fp=0xc0004bdcb0 sp=0xc0004bdab0 pc=0x10051f4b4
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop(0xc0005a2540, 0x100ce1228, 0xc0005a2420)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:373 +0x5f0 fp=0xc0004bdfc0 sp=0xc0004bdcb0 pc=0x100acaa40
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc0004bdfc0 sp=0xc0004bdfc0 pc=0x1004a7f74
created by github.com/lestrrat-go/jwx/jwk.NewAutoRefresh
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:117 +0x1cc

goroutine 458 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee13d8, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00045e400 sp=0xc00045e3e0 pc=0x1004727e0
runtime.netpollblock(0x128ee13b0, 0x72, 0xc00045e468)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc00045e440 sp=0xc00045e400 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee13b0, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc00045e470 sp=0xc00045e440 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc000568698, 0x72, 0x0, 0x1, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc00045e4c0 sp=0xc00045e470 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000568680, 0xc0003291e1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc00045e5b0 sp=0xc00045e4c0 pc=0x1004df6c4
net.(*netFD).Read(0xc000568680, 0xc0003291e1, 0x1, 0x1, 0xc00045e688, 0x1004b3e01, 0xc00045e698)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc00045e630 sp=0xc00045e5b0 pc=0x100638bb8
net.(*conn).Read(0xc000134070, 0xc0003291e1, 0x1, 0x1, 0x0, 0x0, 0xc00045e738)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc00045e6f0 sp=0xc00045e630 pc=0x100646ec8
net.(*TCPConn).Read(0xc000134070, 0xc0003291e1, 0x1, 0x1, 0x0, 0x1004a7f78, 0x100cd0770)
	<autogenerated>:1 +0x50 fp=0xc00045e750 sp=0xc00045e6f0 pc=0x10065aa00
net/http.(*connReader).backgroundRead(0xc0003291d0)
	/usr/local/go/src/net/http/server.go:692 +0x7c fp=0xc00045e7d0 sp=0xc00045e750 pc=0x100a5751c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00045e7d0 sp=0xc00045e7d0 pc=0x1004a7f74
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:688 +0x12c

goroutine 483 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00019f570 sp=0xc00019f550 pc=0x1004727e0
runtime.selectgo(0xc00019f798, 0xc00019f728, 0xc00019f738, 0x0, 0x3, 0xc0001be301, 0x1, 0x1004a7f01)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc00019f6c0 sp=0xc00019f570 pc=0x100484de0
github.com/lestrrat-go/backoff/v2.(*controller).loop(0xc000592060)
	/Users/lestrrat/dev/pkg/mod/github.com/lestrrat-go/backoff/[email protected]/controller.go:52 +0x12c fp=0xc00019f7d0 sp=0xc00019f6c0 pc=0x100a9d07c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00019f7d0 sp=0xc00019f7d0 pc=0x1004a7f74
created by github.com/lestrrat-go/backoff/v2.newController
	/Users/lestrrat/dev/pkg/mod/github.com/lestrrat-go/backoff/[email protected]/controller.go:46 +0x364

goroutine 423 [IO wait]:
runtime.gopark(0x100cd0938, 0x128ee1690, 0x1b02, 0x5)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00046b5c0 sp=0xc00046b5a0 pc=0x1004727e0
runtime.netpollblock(0x128ee1668, 0x72, 0xc00046b628)
	/usr/local/go/src/runtime/netpoll.go:438 +0xac fp=0xc00046b600 sp=0xc00046b5c0 pc=0x10046b75c
internal/poll.runtime_pollWait(0x128ee1668, 0x72, 0x100f309e8)
	/usr/local/go/src/runtime/netpoll.go:222 +0x44 fp=0xc00046b630 sp=0xc00046b600 pc=0x1004a2334
internal/poll.(*pollDesc).wait(0xc000192798, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0xd8 fp=0xc00046b680 sp=0xc00046b630 pc=0x1004de718
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000192780, 0xc0004fe000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:166 +0x1c4 fp=0xc00046b770 sp=0xc00046b680 pc=0x1004df6c4
net.(*netFD).Read(0xc000192780, 0xc0004fe000, 0x1000, 0x1000, 0x0, 0x0, 0x100f7b700)
	/usr/local/go/src/net/fd_posix.go:55 +0x48 fp=0xc00046b7f0 sp=0xc00046b770 pc=0x100638bb8
net.(*conn).Read(0xc000134080, 0xc0004fe000, 0x1000, 0x1000, 0x119, 0xc00036aa80, 0xc00046b8f8)
	/usr/local/go/src/net/net.go:183 +0x98 fp=0xc00046b8b0 sp=0xc00046b7f0 pc=0x100646ec8
net.(*TCPConn).Read(0xc000134080, 0xc0004fe000, 0x1000, 0x1000, 0x100f7b710, 0x0, 0xc00046b9a8)
	<autogenerated>:1 +0x50 fp=0xc00046b910 sp=0xc00046b8b0 pc=0x10065aa00
net/http.(*persistConn).Read(0xc00000c7e0, 0xc0004fe000, 0x1000, 0x1000, 0x1, 0x0, 0xc00046b9f8)
	/usr/local/go/src/net/http/transport.go:1922 +0xa8 fp=0xc00046b9b0 sp=0xc00046b910 pc=0x100a7e948
bufio.(*Reader).fill(0xc000544a20)
	/usr/local/go/src/bufio/bufio.go:101 +0x13c fp=0xc00046ba60 sp=0xc00046b9b0 pc=0x100554d3c
bufio.(*Reader).Peek(0xc000544a20, 0x1, 0x0, 0x1, 0x4, 0x1, 0x3)
	/usr/local/go/src/bufio/bufio.go:139 +0x6c fp=0xc00046baf0 sp=0xc00046ba60 pc=0x1005550bc
net/http.(*persistConn).readLoop(0xc00000c7e0)
	/usr/local/go/src/net/http/transport.go:2083 +0x20c fp=0xc00046bfd0 sp=0xc00046baf0 pc=0x100a7f69c
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00046bfd0 sp=0xc00046bfd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1743 +0xac0

goroutine 449 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc00046cc90 sp=0xc00046cc70 pc=0x1004727e0
runtime.selectgo(0xc00046d098, 0xc00046ce78, 0xc00046cea0, 0x0, 0x4, 0xc000262001, 0xf, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc00046cde0 sp=0xc00046cc90 pc=0x100484de0
net/http.(*Transport).getConn(0x100f7b700, 0xc0002422c0, 0x0, 0xc0001be3a8, 0x4, 0xc0002620c0, 0xf, 0x0, 0x0, 0x0, ...)
	/usr/local/go/src/net/http/transport.go:1368 +0x6e8 fp=0xc00046d0e0 sp=0xc00046cde0 pc=0x100a797f8
net/http.(*Transport).roundTrip(0x100f7b700, 0xc0002c6000, 0xc0006f61b0, 0x0, 0xc00046d498)
	/usr/local/go/src/net/http/transport.go:579 +0x7c4 fp=0xc00046d460 sp=0xc00046d0e0 pc=0x100a73a64
net/http.(*Transport).RoundTrip(0x100f7b700, 0xc0002c6000, 0x100f7b700, 0x0, 0x0)
	/usr/local/go/src/net/http/roundtrip.go:17 +0x34 fp=0xc00046d4b0 sp=0xc00046d460 pc=0x100a559c4
net/http.send(0xc0002c6000, 0x100cd9e58, 0x100f7b700, 0x0, 0x0, 0x0, 0xc000010010, 0x0, 0xc00046d828, 0x100a11728)
	/usr/local/go/src/net/http/client.go:251 +0x4f4 fp=0xc00046d770 sp=0xc00046d4b0 pc=0x100a0f794
net/http.(*Client).send(0x100f8c540, 0xc0002c6000, 0x0, 0x0, 0x0, 0xc000010010, 0x0, 0x1, 0xa)
	/usr/local/go/src/net/http/client.go:175 +0x14c fp=0xc00046d830 sp=0xc00046d770 pc=0x100a0f02c
net/http.(*Client).do(0x100f8c540, 0xc0002c6000, 0x0, 0x0, 0x0)
	/usr/local/go/src/net/http/client.go:717 +0x1d4 fp=0xc00046dbb0 sp=0xc00046d830 pc=0x100a11414
net/http.(*Client).Do(...)
	/usr/local/go/src/net/http/client.go:585
github.com/lestrrat-go/jwx/jwk.fetch(0x100ce1228, 0xc000544900, 0xc0001be3a8, 0x16, 0xc0002d80e0, 0x2, 0x2, 0x2, 0xc00019f548, 0x0)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/jwk.go:237 +0x1f8 fp=0xc00046dcb0 sp=0xc00046dbb0 pc=0x100ab7d08
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).doRefreshRequest(0xc000544960, 0x100ce1228, 0xc000544900, 0xc0001be3a8, 0x16, 0x1, 0x0, 0x0)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:445 +0x200 fp=0xc00046df60 sp=0xc00046dcb0 pc=0x100acb350
github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop.func1(0xc000544960, 0x100ce1228, 0xc000544900, 0xc000568580)
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:421 +0x6c fp=0xc00046dfb0 sp=0xc00046df60 pc=0x100ae60dc
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc00046dfb0 sp=0xc00046dfb0 pc=0x1004a7f74
created by github.com/lestrrat-go/jwx/jwk.(*AutoRefresh).refreshLoop
	/Users/lestrrat/dev/src/github.com/lestrrat-go/jwx/jwk/refresh.go:419 +0x930

goroutine 500 [select]:
runtime.gopark(0x100cd0a78, 0x0, 0x1809, 0x1)
	/usr/local/go/src/runtime/proc.go:336 +0xd0 fp=0xc000058cd0 sp=0xc000058cb0 pc=0x1004727e0
runtime.selectgo(0xc000058fa8, 0xc000058e98, 0xc000058ea0, 0x0, 0x2, 0x1, 0x0, 0x0)
	/usr/local/go/src/runtime/select.go:327 +0xed0 fp=0xc000058e20 sp=0xc000058cd0 pc=0x100484de0
net/http.(*persistConn).writeLoop(0xc00015c120)
	/usr/local/go/src/net/http/transport.go:2382 +0x114 fp=0xc000058fd0 sp=0xc000058e20 pc=0x100a818c4
runtime.goexit()
	/usr/local/go/src/runtime/asm_arm64.s:1130 +0x4 fp=0xc000058fd0 sp=0xc000058fd0 pc=0x1004a7f74
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1744 +0xae0
exit status 2
FAIL	github.com/lestrrat-go/jwx/jwk	18.816s

My code definitely does not use cgo or unsafe, and this does NOT happen with encoding/json

json.Compact has an incompatible behavior

I have encountered an incompatible behavior.
https://gist.github.com/orisano/8aa749cd50fece0a61694ee60b87a208

Source

package main

import (
	"bytes"
	"testing"
	
	stdjson "encoding/json"
	gojson "github.com/goccy/go-json"
)

func TestCompact(t *testing.T) {
	src := []byte(`"\`)
	if err := stdjson.Compact(bytes.NewBuffer(nil), src); err != nil {
		t.Error(err)
	}
	if err := gojson.Compact(bytes.NewBuffer(nil), src); err != nil {
		t.Error(err)
	}
}

Result

--- FAIL: TestCompact (0.00s)
    compact_test.go:14: invalid character ' ' in string escape code
panic: runtime error: index out of range [2] with length 2 [recovered]
	panic: runtime error: index out of range [2] with length 2

goroutine 49 [running]:
testing.tRunner.func1.1(0x1144440, 0xc0006a8020)
	/Users/orisano/sdk/go1.15.6/src/testing/testing.go:1072 +0x30d
testing.tRunner.func1(0xc000682480)
	/Users/orisano/sdk/go1.15.6/src/testing/testing.go:1075 +0x41a
panic(0x1144440, 0xc0006a8020)
	/Users/orisano/sdk/go1.15.6/src/runtime/panic.go:969 +0x1b9
github.com/goccy/go-json.compact(0xc000066f20, 0xc000066f0e, 0x2, 0x2, 0x106b300, 0x1197e80, 0xc00069c020)
	/Users/orisano/go/pkg/mod/github.com/goccy/[email protected]/compact.go:34 +0x469
github.com/goccy/go-json.Compact(...)
	/Users/orisano/go/pkg/mod/github.com/goccy/[email protected]/json.go:349
gojson.TestCompact(0xc000682480)
	/Users/orisano/works/gojson/compact_test.go:16 +0x125
testing.tRunner(0xc000682480, 0x11758b8)
	/Users/orisano/sdk/go1.15.6/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
	/Users/orisano/sdk/go1.15.6/src/testing/testing.go:1168 +0x2b3
exit status 2
FAIL	gojson	0.290s

go-json panicked.
Maybe cause is here.

go-json/compact.go

Lines 32 to 36 in 7ffe1dd

case '\\':
cursor++
if err := dst.WriteByte(src[cursor]); err != nil {
return err
}

What is the correct behavior?

Propose: use an fast int-int map to cache type information

Hi, this json package is awesome, the performance is very impressive.
I saw the idea of "Dispatch by typeptr from map to slice" is limited by the type slice size and I got an idea to help this.

Some time ago, I discovered a very fast int key to int value map implemention here: https://github.com/brentp/intintmap/.
From my recent benchmark, it shows that a further optimized copy-on-write version of the int-int map can be nearly fast as slice index (without unsafe slice bounds checking elimination), I think it may be a better choice than the current implementation, and it doesn't waste memory.

cpu: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
BenchmarkConcurrentStdMapGet_NoLock-12                  72221664                15.79 ns/op
BenchmarkConcurrentStdMapGet_RWMutex-12                  3255450               369.01 ns/op
BenchmarkConcurrentSyncMapGet-12                        27300724                44.59 ns/op
BenchmarkConcurrentCOWMapGet-12                        344179628                 3.487 ns/op
BenchmarkConcurrentSliceIndex-12                       908571164                 1.213 ns/op

The benchmark code is here:
https://github.com/jxskiss/gopkg/blob/master/intintmap/cow_test.go

Do you think it's a good idea to use the int-int map for the codec cache?
I can send a PR if it's welcomed.

(PS. saying the int-int map, I am not meaning to introduce external dependencies, we can just implement the functionality that we need for the type information cache.)

json: cannot unmarshal object into Go value of type *net.IPNet

package main

import (
	_ "encoding/json" // ok
	"fmt"
	"net"

	"github.com/goccy/go-json" // panic
)

type tConf struct {
	WhiteListConf []string `json:"white_list"`
	WhiteList     map[*net.IPNet]struct{}
}

func main() {
	var conf tConf
	js := `{"white_list": ["1.1.1.1", "2.2.2.0/24"]}`
	if err := json.Unmarshal([]byte(js), &conf); err != nil {
		panic(err)
	}
	fmt.Println(conf)
}

// panic: json: cannot unmarshal object into Go value of type *net.IPNet

compile: signal: killed

Running with 7Gb outh of 16 Gb available on local machine using new Go 1.16 compiler:

go build github.com/goccy/go-json: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
 go get -u -x github.com/goccy/go-json 
# get https://goproxy.internal.lan/github.com/goccy/@v/list
# get https://goproxy.internal.lan/github.com/goccy/go-json/@v/list
# get https://goproxy.internal.lan/github.com/@v/list
# get https://goproxy.internal.lan/github.com/goccy/go-json/@v/list: 200 OK (0.057s)
# get https://goproxy.internal.lan/github.com/goccy/@v/list: 404 Not Found (0.057s)
# get https://goproxy.internal.lan/github.com/@v/list: 404 Not Found (0.057s)
WORK=/tmp/go-build3285744396
mkdir -p $WORK/b001/
cat >$WORK/b001/importcfg << 'EOF' # internal
# import config
packagefile bytes=/usr/local/go/pkg/linux_amd64/bytes.a
packagefile encoding=/usr/local/go/pkg/linux_amd64/encoding.a
packagefile encoding/base64=/usr/local/go/pkg/linux_amd64/encoding/base64.a
packagefile errors=/usr/local/go/pkg/linux_amd64/errors.a
packagefile fmt=/usr/local/go/pkg/linux_amd64/fmt.a
packagefile io=/usr/local/go/pkg/linux_amd64/io.a
packagefile math=/usr/local/go/pkg/linux_amd64/math.a
packagefile math/bits=/usr/local/go/pkg/linux_amd64/math/bits.a
packagefile reflect=/usr/local/go/pkg/linux_amd64/reflect.a
packagefile runtime=/usr/local/go/pkg/linux_amd64/runtime.a
packagefile sort=/usr/local/go/pkg/linux_amd64/sort.a
packagefile strconv=/usr/local/go/pkg/linux_amd64/strconv.a
packagefile strings=/usr/local/go/pkg/linux_amd64/strings.a
packagefile sync=/usr/local/go/pkg/linux_amd64/sync.a
packagefile sync/atomic=/usr/local/go/pkg/linux_amd64/sync/atomic.a
packagefile unicode=/usr/local/go/pkg/linux_amd64/unicode.a
packagefile unicode/utf16=/usr/local/go/pkg/linux_amd64/unicode/utf16.a
packagefile unicode/utf8=/usr/local/go/pkg/linux_amd64/unicode/utf8.a
EOF

/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/b001/_pkg_.a -trimpath "$WORK/b001=>" -p github.com/goccy/go-json -lang=go1.12 -complete -buildid enu8Gz5ZXEiCvPU98SWs/enu8Gz5ZXEiCvPU98SWs -goversion go1.16 -D "" -importcfg $WORK/b001/importcfg -pack -c=4 /home/iru/go/pkg/mod/github.com/goccy/[email protected]/codec.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/compact.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_anonymous_field.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_array.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_bool.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_bytes.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_compile.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_compile_norace.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_context.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_float.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_int.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_interface.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_map.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_number.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_slice.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_stream.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_string.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_uint.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_text.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_wrapped_string.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_compile_norace.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_context.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_int.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_map113.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_opcode.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_optype.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_string.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_escaped.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_escaped_indent.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_indent.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/error.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/indent.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/json.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/option.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/rtype.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/struct_field.go
go build github.com/goccy/go-json: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

via ๐Ÿน v1.16 
โฏ go get -u -x github.com/goccy/go-json
# get https://goproxy.internal.lan/github.com/@v/list
# get https://goproxy.internal.lan/github.com/goccy/@v/list
# get https://goproxy.internal.lan/github.com/goccy/go-json/@v/list
# get https://goproxy.internal.lan/github.com/goccy/@v/list: 404 Not Found (0.062s)
# get https://goproxy.internal.lan/github.com/goccy/go-json/@v/list: 200 OK (0.062s)
# get https://goproxy.internal.lan/github.com/@v/list: 404 Not Found (0.063s)
WORK=/tmp/go-build3042749253
mkdir -p $WORK/b001/
cat >$WORK/b001/importcfg << 'EOF' # internal
# import config
packagefile bytes=/usr/local/go/pkg/linux_amd64/bytes.a
packagefile encoding=/usr/local/go/pkg/linux_amd64/encoding.a
packagefile encoding/base64=/usr/local/go/pkg/linux_amd64/encoding/base64.a
packagefile errors=/usr/local/go/pkg/linux_amd64/errors.a
packagefile fmt=/usr/local/go/pkg/linux_amd64/fmt.a
packagefile io=/usr/local/go/pkg/linux_amd64/io.a
packagefile math=/usr/local/go/pkg/linux_amd64/math.a
packagefile math/bits=/usr/local/go/pkg/linux_amd64/math/bits.a
packagefile reflect=/usr/local/go/pkg/linux_amd64/reflect.a
packagefile runtime=/usr/local/go/pkg/linux_amd64/runtime.a
packagefile sort=/usr/local/go/pkg/linux_amd64/sort.a
packagefile strconv=/usr/local/go/pkg/linux_amd64/strconv.a
packagefile strings=/usr/local/go/pkg/linux_amd64/strings.a
packagefile sync=/usr/local/go/pkg/linux_amd64/sync.a
packagefile sync/atomic=/usr/local/go/pkg/linux_amd64/sync/atomic.a
packagefile unicode=/usr/local/go/pkg/linux_amd64/unicode.a
packagefile unicode/utf16=/usr/local/go/pkg/linux_amd64/unicode/utf16.a
packagefile unicode/utf8=/usr/local/go/pkg/linux_amd64/unicode/utf8.a
EOF

/usr/local/go/pkg/tool/linux_amd64/compile -o $WORK/b001/_pkg_.a -trimpath "$WORK/b001=>" -p github.com/goccy/go-json -lang=go1.12 -complete -buildid enu8Gz5ZXEiCvPU98SWs/enu8Gz5ZXEiCvPU98SWs -goversion go1.16 -D "" -importcfg $WORK/b001/importcfg -pack -c=4 /home/iru/go/pkg/mod/github.com/goccy/[email protected]/codec.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/compact.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_anonymous_field.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_array.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_bool.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_bytes.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_compile.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_compile_norace.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_context.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_float.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_int.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_interface.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_map.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_number.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_ptr.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_slice.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_stream.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_string.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_struct.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_uint.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_json.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_unmarshal_text.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/decode_wrapped_string.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_compile_norace.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_context.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_int.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_map113.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_opcode.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_optype.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_string.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_escaped.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_escaped_indent.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/encode_vm_indent.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/error.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/indent.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/json.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/option.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/rtype.go /home/iru/go/pkg/mod/github.com/goccy/[email protected]/struct_field.go
go build github.com/goccy/go-json: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

Seems to be a similar issue -- blevesearch/segment#5 -- "fast at runtime but slow compilation and this high memory requirement are side-effects"

Marshal ignores omitempty struct tag on custom type

go: go1.16 windows/amd64
go-json: master (v0.4.12-0.20210411072911-c74c2078ead8)

package test

import (
	"encoding/json"
	"strconv"
	"testing"

	gojson "github.com/goccy/go-json"
)

type CustomInt int

func (i CustomInt) MarshalJSON() ([]byte, error) {
	return []byte(strconv.Itoa(int(i))), nil
}

type Foo struct {
	Bar CustomInt `json:"b,omitempty"`
}

func TestOmitempty(t *testing.T) {
	foo := &Foo{}

	data, _ := json.Marshal(foo)
	t.Log(string(data)) // {}

	data, _ = gojson.Marshal(foo)
	t.Log(string(data)) // {"b":0}
}

generated go struct wrapped to slice cause panic

proto file

package common;

message Id {
  string id = 1;
}

go code

package main

import (
	"fmt"
        "encoding/json"

        gjson "github.com/goccy/go-json"

	"xxx/common"
)

func main() {
       // common.Id is proto generated go struct
	type Data struct {
		A []*common.Id
	}

	d := &Data{A: []*common.Id{{Id: "1"}, {Id: "2"}}}

	// fmt.Println(json.Marshal(d)) this works
    
        // this panics
	fmt.Println(gjson.Marshal(d))
}

This panic on both v0.4.7 or master branch

bb, err := encodeMarshalJSON(code, b, ptrToInterface(code, p), true)

Panic at internal/encoder/vm_escaped/util.go:33

While trying to migrate to go-json, we are seeing a crash in the encoder. The same encoding works fine using encoding/json and json-iterator/go.

I don't have the details on what exact struct causes the crash yet, but by the off-chance that you can already see the issue from the stack trace alone, I'm posting it here. Origin of the encoder call here. Struct definition here.

PANIC: runtime error: invalid memory address or nil pointer dereference
  /usr/local/go/src/runtime/panic.go:212 (0x43805a)
    panicmem: panic(memoryError)
  /usr/local/go/src/runtime/signal_unix.go:734 (0x451db2)
    sigpanic: panicmem()
  /drone/src/vendor/github.com/goccy/go-json/internal/encoder/vm_escaped/util.go:33 (0x6c10eb)
    ptrToUint64: func ptrToUint64(p uintptr) uint64              { return **(**uint64)(unsafe.Pointer(&p)) }
  /drone/src/vendor/github.com/goccy/go-json/internal/encoder/vm_escaped/vm.go:688 (0x6c10d0)
    Run: b = appendInt(b, ptrToUint64(p+code.Offset), code)
  /drone/src/vendor/github.com/goccy/go-json/encode.go:281 (0x7475fd)
    encodeRunCode: return vm_escaped.Run(ctx, b, codeSet, encoder.Option(opt))
  /drone/src/vendor/github.com/goccy/go-json/encode.go:211 (0x746e94)
    encode: buf, err := encodeRunCode(ctx, b, codeSet, opt)
  /drone/src/vendor/github.com/goccy/go-json/encode.go:95 (0x7467cb)
    (*Encoder).encodeWithOption: buf, err = encode(ctx, v, opt)
  /drone/src/vendor/github.com/goccy/go-json/encode.go:74 (0x746504)
    (*Encoder).EncodeWithOption: err := e.encodeWithOption(ctx, v, optFuncs...)
  /drone/src/vendor/github.com/goccy/go-json/encode.go:67 (0x1b1ce84)
    (*Encoder).Encode: return e.EncodeWithOption(v)
  /drone/src/modules/context/context.go:373 (0x1b1cdea)
    (*Context).JSON: if err := json.NewEncoder(ctx.Resp).Encode(content); err != nil {
  /drone/src/routers/api/v1/user/gpg_key.go:30 (0x20230d4)
    listGPGKeys: ctx.JSON(http.StatusOK, &apiKeys)

Consider using golangci-lint

I just realized that the project does not run any code linters, when I noticed that some variables in encode_string.go were not used. Some of these are frivolous, but the amount of unused code kind of worries me.

Can we add a Github action to run golangci-lint? I can create a PR.

Meanwhile, here's the current status

% golangci-lint run ./...
decode_string.go:153:6: `appendCoerceInvalidUTF8` is unused (deadcode)
func appendCoerceInvalidUTF8(b []byte, s []byte) []byte {
     ^
encode.go:44:2: `opCodeEscapedType` is unused (deadcode)
	opCodeEscapedType = iota
	^
encode.go:45:2: `opCodeEscapedIndentType` is unused (deadcode)
	opCodeEscapedIndentType
	^
encode.go:46:2: `opCodeNoEscapeType` is unused (deadcode)
	opCodeNoEscapeType
	^
encode.go:47:2: `opCodeNoEscapeIndentType` is unused (deadcode)
	opCodeNoEscapeIndentType
	^
encode.go:73:2: `codePool` is unused (deadcode)
	codePool         sync.Pool
	^
encode.go:372:6: `encodeBytes` is unused (deadcode)
func encodeBytes(dst []byte, src []byte) []byte {
     ^
encode_string.go:357:5: `htmlSafeSet` is unused (deadcode)
var htmlSafeSet = [256]bool{
    ^
encode_string.go:590:5: `safeSet` is unused (deadcode)
var safeSet = [utf8.RuneSelf]bool{
    ^
encode_string.go:722:6: `escapeIndexWithHTMLEscape` is unused (deadcode)
func escapeIndexWithHTMLEscape(s string) int {
     ^
decode_test.go:2085:5: `interfaceSetTests` is unused (deadcode)
var interfaceSetTests = []struct {
    ^
decode_test.go:2314:5: `decodeTypeErrorTests` is unused (deadcode)
var decodeTypeErrorTests = []struct {
    ^
decode_test.go:2479:5: `invalidUnmarshalTests` is unused (deadcode)
var invalidUnmarshalTests = []struct {
    ^
decode_test.go:2504:5: `invalidUnmarshalTextTests` is unused (deadcode)
var invalidUnmarshalTextTests = []struct {
    ^
stream_test.go:325:5: `tokenStreamCases` is unused (deadcode)
var tokenStreamCases = []tokenStreamCase{
    ^
cover_helper_test.go:29:12: Error return value of `enc.Encode` is not checked (errcheck)
	enc.Encode(data)
	          ^
decode_test.go:2736:16: Error return value of `json.Unmarshal` is not checked (errcheck)
	json.Unmarshal([]byte("{}"), &unmarshalPanic{})
	              ^
encode_test.go:830:14: Error return value of `json.Marshal` is not checked (errcheck)
	json.Marshal(&marshalPanic{})
	            ^
example_test.go:262:13: Error return value of `json.Indent` is not checked (errcheck)
	json.Indent(&out, b, "=", "\t")
	           ^
example_test.go:263:13: Error return value of `out.WriteTo` is not checked (errcheck)
	out.WriteTo(os.Stdout)
	           ^
example_test.go:310:13: Error return value of `out.WriteTo` is not checked (errcheck)
	out.WriteTo(os.Stdout)
	           ^
stream_test.go:88:13: Error return value of `enc.Encode` is not checked (errcheck)
		enc.Encode(v)
		          ^
stream_test.go:303:13: Error return value of `w.Write` is not checked (errcheck)
		go w.Write([]byte(enc))
		          ^
stream_test.go:438:10: Error return value of `w.Write` is not checked (errcheck)
		w.Write([]byte(raw))
		       ^
decode_map.go:154:3: ineffectual assignment to `cursor` (ineffassign)
		cursor = valueCursor
		^
decode_stream.go:19:2: `readPos` is unused (structcheck)
	readPos               int64
	^
decode.go:25:2: `disallowUnknownFields` is unused (structcheck)
	disallowUnknownFields bool
	^
encode_context.go:31:2: `iter` is unused (structcheck)
	iter  unsafe.Pointer
	^
decode_test.go:423:2: `x` is unused (structcheck)
	x int
	^
decode_test.go:1366:2: `unexported` is unused (structcheck)
	unexported int
	^
decode_test.go:2363:2: `m` is unused (structcheck)
	m    map[string]interface{} `json:"-"`
	^
decode_test.go:2364:2: `m2` is unused (structcheck)
	m2   map[string]interface{} `json:"abcd"`
	^
decode_test.go:2366:2: `s` is unused (structcheck)
	s []int `json:"-"`
	^
stream_test.go:317:2: `json` is unused (structcheck)
	json      string
	^
stream_test.go:318:2: `expTokens` is unused (structcheck)
	expTokens []interface{}
	^
decode_test.go:221:4: S1021: should merge variable declaration with assignment on next line (gosimple)
			var v interface{}
			^
struct_field.go:25:2: S1008: should use 'return tag == "-"' instead of 'if tag == "-" { return true }; return false' (gosimple)
	if tag == "-" {
	^
encode_test.go:107:4: structtag: struct field a has json tag but is not exported (govet)
			a int    `json:"aa"` // private field
			^
encode_test.go:440:4: structtag: struct field a has json tag but is not exported (govet)
			a int    `json:"aa"` // private field
			^
tagkey_test.go:62:2: structtag: struct field tag `:"BadFormat"` not compatible with reflect.StructTag.Get: bad syntax for struct tag key (govet)
	Y string `:"BadFormat"`
	^
decode.go:248:2: unreachable: unreachable code (govet)
	return nil, io.EOF
	^
decode_bytes.go:150:4: unreachable: unreachable code (govet)
			return nil, 0, errUnexpectedEndOfJSON("[]byte", cursor)
			^
decode_context.go:145:2: unreachable: unreachable code (govet)
	return cursor, errUnexpectedEndOfJSON("value of object", cursor)
	^
encode_string.go:771:37: unsafeptr: possible misuse of reflect.SliceHeader (govet)
	return *(*[]uint64)(unsafe.Pointer(&reflect.SliceHeader{
	                                   ^
encode_compile.go:648:4: SA4004: the surrounding loop is unconditionally terminated (staticcheck)
			break
			^
encode_compile.go:772:4: SA4004: the surrounding loop is unconditionally terminated (staticcheck)
			break
			^
encode.go:136:2: SA9003: empty branch (staticcheck)
	if err := setupOpcodeSets(); err != nil {
	^
cover_float32_test.go:1207:7: SA5008: the JSON string option only applies to fields of type string, floating point, integer or bool, or pointers to those (staticcheck)
				} `json:",string"`
				  ^
cover_float32_test.go:1781:7: SA5008: the JSON string option only applies to fields of type string, floating point, integer or bool, or pointers to those (staticcheck)
				} `json:",string"`
				  ^
cover_float32_test.go:1784:7: SA5008: the JSON string option only applies to fields of type string, floating point, integer or bool, or pointers to those (staticcheck)
				} `json:",string"`
				  ^
decode_test.go:1317:14: SA5008: unknown JSON option "dummyopt" (staticcheck)
	Foo2 string `json:"bar2,dummyopt"`
	            ^
encode_test.go:1585:15: SA5008: unknown JSON option "random" (staticcheck)
	Slr []string `json:"slr,random"`
	             ^
stream_test.go:113:15: SA5008: invalid JSON field name "\\" (staticcheck)
		Invalid int `json:"\\"`
		            ^
tagkey_test.go:66:11: SA5008: invalid JSON field name " !\"#&'()*+" (staticcheck)
	Z string `json:" !\"#&'()*+,."`
	         ^
encode_opcode.go:250:18: func `(*opcode).dumpKey` is unused (unused)
decode_test.go:1931:6: type `Xint` is unused (unused)
decode_test.go:589:6: type `XYZ` is unused (unused)
encode_opcode.go:263:18: func `(*opcode).dumpValue` is unused (unused)
decode_test.go:595:6: type `unexportedWithMethods` is unused (unused)
encode_opcode.go:217:18: func `(*opcode).dumpElem` is unused (unused)
encode_opcode.go:205:18: func `(*opcode).dumpMapEnd` is unused (unused)
decode_test.go:645:6: type `byteWithPtrMarshalText` is unused (unused)
encode_opcode.go:237:18: func `(*opcode).dumpField` is unused (unused)
encode_opcode.go:191:18: func `(*opcode).dumpMapHead` is unused (unused)
encode_vm.go:9388:19: func `(*Encoder).ptrToByte` is unused (unused)
encode_opcode.go:274:18: func `(*opcode).dump` is unused (unused)
decode_test.go:1618:6: type `NullTest` is unused (unused)
encode_opcode.go:172:18: func `(*opcode).dumpHead` is unused (unused)

go-json Marshal ignores omitempty struct tag

go version: go1.16.3 windows/amd64
go-json version: github.com/goccy/go-json v0.4.11

What happened?

While searching for the cause of an indentation conflict between the standard module and this one, i came across this behaviour that go-json will ignore the json:",omitempty" struct tag when calling Marshal(). It will instead give the field a default zero-value.

How to reproduce?

Execute the following test with go-json imported as json and encoding/json imported as jsonStd:

*EDIT: Updated Test for more types

func TestCompareJSONModules(t *testing.T) {
	var exampleJSON, exampleJSONStd struct {
		T struct {
			T1 bool        `json:"t1,omitempty"`
			T2 float64     `json:"t2,omitempty"`
			T3 string      `json:"t3,omitempty"`
			T4 []string    `json:"t4,omitempty"`
			T5 *struct{}   `json:"t5,omitempty"`
			T6 interface{} `json:"t6,omitempty"`
		} `json:"t"`
	}
	jsonExample := `{
	"t": {
		"t1": false,
		"t2": 0,
		"t3": "",
		"t4": [],
		"t5": null,
		"t6": null
	}` + "\n}"
	_ = json.Unmarshal([]byte(jsonExample), &exampleJSON)
	_ = jsonStd.Unmarshal([]byte(jsonExample), &exampleJSONStd)
	bJSON, _ := json.Marshal(exampleJSON)
	bJSONStd, _ := jsonStd.Marshal(exampleJSONStd)
	sJSON := string(bJSON)
	sJSONStd := string(bJSONStd)
	if sJSON != sJSONStd {
		t.Fatalf("conflict:\ngo-json:\n%#v\nencoding/json:\n%#v\n", sJSON, sJSONStd)
	}
}

The output should look something like:

conflict:
go-json:
"{\"t\":{\"t4\":[],\"t6\":null}}"
encoding/json:
"{\"t\":{}}"

package cause panic

goroutine 191 [runnable]:
github.com/goccy/go-json.(*Encoder).encodeString(0xc000284070, 0xc000164133, 0x4)
/home/hello/go/pkg/mod/github.com/goccy/[email protected]/encode.go:333 +0x73
github.com/goccy/go-json.(*Encoder).run(0xc000284070, 0xc000576cc0, 0xc0002c1b30, 0xbdbcc0, 0xc000280100)
/home/hello/go/pkg/mod/github.com/goccy/[email protected]/encode_vm.go:163 +0x4cad
github.com/goccy/go-json.(*Encoder).encode(0xc000284070, 0xbf5520, 0xc000335ae0, 0xc0000bf9d8, 0xa63d11)
/home/hello/go/pkg/mod/github.com/goccy/[email protected]/encode.go:188 +0x365
github.com/goccy/go-json.(*Encoder).encodeForMarshal(0xc000284070, 0xbf5520, 0xc0000bfae0, 0xc00012d450, 0x0, 0x0, 0xc00038ab8b, 0x7)
/home/hello/go/pkg/mod/github.com/goccy/[email protected]/encode.go:151 +0x45
github.com/goccy/go-json.MarshalWithOption(0xbf5520, 0xc0000bfae0, 0x0, 0x0, 0x0, 0x49, 0x0, 0x0, 0x38, 0x40bc5f)
/home/hello/go/pkg/mod/github.com/goccy/[email protected]/json.go:169 +0xe5
github.com/goccy/go-json.Marshal(...)
/home/hello/go/pkg/mod/github.com/goccy/[email protected]/json.go:157

Unmarshal fails when decoding `null` as slice

Unmarshal fails when decoding null as slice.
Referring to encoding/json, the expected result is typed nil.
This issue is similar to #5 .

Reproduction code

package main

import (
	encodingjson "encoding/json"
	"fmt"

	goccyjson "github.com/goccy/go-json"
)

type Message struct {
	Fields []string `json:"field"`
}

func main() {
	ok := `{"field": ["value"]}`
	ng := `{"field": null}`

	fmt.Println("encoding/json")
	for _, s := range []string{ok, ng} {
		var msg Message
		err := encodingjson.Unmarshal([]byte(s), &msg)
		if err != nil {
			panic(err)
		}
		fmt.Printf("%#v\n", msg)
	}

	fmt.Println("goccy/go-json")
	for _, s := range []string{ok, ng} {
		var msg Message
		err := goccyjson.Unmarshal([]byte(s), &msg)
		if err != nil {
			panic(err)
		}
		fmt.Printf("%#v\n", msg)
	}
}

encoding/json
main.Message{Fields:[]string{"value"}}
main.Message{Fields:[]string(nil)}
goccy/go-json
main.Message{Fields:[]string{"value"}}
panic: unexpected end of JSON input for slice

goroutine 1 [running]:
main.main()
/tmp/sandbox005927213/prog.go:33 +0x54d

https://play.golang.org/p/Vtr490WAF2e

consolidate matching tokens

ๆœ€ๅˆใฏ len(buf)ใจcursorใ‚’ๆฏ”่ผƒใ—ใชใ„ใง buf[cursor] ใ—ใฆใ‚‹ใจใ“ใ‚ใŒๅฑใชใ„ใชใ€œใจๆ€ใฃใฆใ‚ณใƒผใƒ‰ใ‚’่ฆ‹ใฆใ„ใŸใฎใงใ™ใŒใ€ๆฐ—ใฅใ„ใŸใ‚‰ 'n', 'u', 'l', 'l' ใ‚’ๆŽขใ—ใฆๆฏ”่ผƒใ—ใฆใ„ใ‚‹ๅ…จใๅŒใ˜ใ‚ณใƒผใƒ‰ใŒๆ•ฐใ‚ซๆ‰€ใซใ‚ใฃใŸใฎใงไธ€ใ‚ซๆ‰€ใซใพใจใ‚ใฆใฟใพใ—ใŸใ€‚

lestrrat-go@4c8d8ff

ใ“ใ‚“ใชๆ„Ÿใ˜ใฎๅค‰ๆ›ดใ‚’ใ—ใฆใ‚ˆใ‘ใ‚Œใฐใ€ไป–ใฎ"true", "false"ใจใ‹ใฎใƒˆใƒผใ‚ฏใƒณใ‚‚ไผผใŸใ‚ˆใ†ใซใƒžใƒƒใƒใ™ใ‚‹ใ‚ณใƒผใƒ‰ใ‚’่ฟฝๅŠ ใ—ใพใ™ใŒใ€ใ„ใ‹ใŒใงใ—ใ‚‡ใ†

Decoding error when streaming decompressed JSON

Reproducer fails with json: string unexpected end of JSON input.

This happens because gzip.Reader does not always fill the full buffer, and so last value should not be used as stop trigger.
https://github.com/goccy/go-json/blob/v0.4.2/decode_stream.go#L78

image

Reproducer
func Test_fail(t *testing.T) {
	type someStruct struct {
		Header string   `header:"X-Header" json:"-"`
		ID     int      `json:"id"`
		Text   []string `json:"text"`
	}

	j := `{"id":123,"text":["Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?","Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?"]}`

	zw := bytes.NewBuffer(nil)
	gw := gzip.NewWriter(zw)

	_, err := io.Copy(gw, bytes.NewReader([]byte(j)))
	assert.NoError(t, err)
	assert.NoError(t, gw.Close())

	gr, err := gzip.NewReader(bytes.NewReader(zw.Bytes()))
	assert.NoError(t, err)

	var v someStruct

	dec := json.NewDecoder(gr)

	assert.NoError(t, dec.Decode(&v))
}

go-json MarshalIndent adds unexpected indentation for empty arrays

go version: go1.16.3 windows/amd64
go-json version: github.com/goccy/go-json v0.4.11

What happened?

When using MarshalIndent(some, "", "\t") the output has to much indentation when the value is an empty array [].

How to reproduce

Execute the following test with go-json imported as json and encoding/json imported as jsonStd:

func TestCompareJSONModulesMarshalIndent(t *testing.T) {
	var exampleJSON, exampleJSONStd struct {
		T struct {
			T1 bool        `json:"t1"`
			T2 float64     `json:"t2"`
			T3 string      `json:"t3"`
			T4 []string    `json:"t4"`
			T5 *struct{}   `json:"t5"`
			T6 interface{} `json:"t6"`
			T7 [][]string  `json:"t7"`
		} `json:"t"`
	}
	jsonExample := `{
	"t": {
		"t1": false,
		"t2": 0,
		"t3": "",
		"t4": [],
		"t5": null,
		"t6": null,
		"t7": [[""], ["hello", "world"], []]
	}` + "\n}"
	_ = json.Unmarshal([]byte(jsonExample), &exampleJSON)
	_ = jsonStd.Unmarshal([]byte(jsonExample), &exampleJSONStd)
	bJSON, _ := json.MarshalIndent(exampleJSON, "", "\t")
	bJSONStd, _ := jsonStd.MarshalIndent(exampleJSONStd, "", "\t")
	sJSON := string(bJSON)
	sJSONStd := string(bJSONStd)
	if sJSON != sJSONStd {
		t.Fatalf("conflict:\ngo-json:\n%v\nencoding/json:\n%v\n", sJSON, sJSONStd)
	}
}

Output:

conflict:
go-json:
{
	"t": {
		"t1": false,
		"t2": 0,
		"t3": "",
		"t4": 		[],
		"t5": null,
		"t6": null,
		"t7": [
			[
				""
			],
			[
				"hello",
				"world"
			],
						[]
		]
	}
}
encoding/json:
{
	"t": {
		"t1": false,
		"t2": 0,
		"t3": "",
		"t4": [],
		"t5": null,
		"t6": null,
		"t7": [
			[
				""
			],
			[
				"hello",
				"world"
			],
			[]
		]
	}
}

With recursive structure, stack overflow is occurred

Something like the following.

package main

import (
	"io"
	"log"
	"os"

	"github.com/goccy/go-json"
)

type Person struct {
	Name   string  `json:"name"`
	Age    int     `json:"age"`
	Father *Person `json:"father,omitempty"`
	Mother *Person `json:"mother,omitempty"`
}

func main() {
	if err := run(os.Stdout); err != nil {
		log.Fatalf("%+v", err)
	}
}

func run(o io.Writer) error {
	p := &Person{
		Name: "foo",
		Age:  20,
		Father: &Person{
			Name: "bar",
			Age:  40,
		},
	}
	encoder := json.NewEncoder(o)
	return encoder.Encode(p)
}
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0200e0330 stack=[0xc0200e0000, 0xc0400e0000]
fatal error: stack overflow

full stack-trace is here.

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc0200e0330 stack=[0xc0200e0000, 0xc0400e0000]
fatal error: stack overflow

runtime stack:
runtime.throw(0x1105fb6, 0xe)
	/opt/local/lib/go/src/runtime/panic.go:1116 +0x72
runtime.newstack()
	/opt/local/lib/go/src/runtime/stack.go:1035 +0x6ce
runtime.morestack()
	/opt/local/lib/go/src/runtime/asm_amd64.s:449 +0x8f

goroutine 1 [running]:
reflect.name.tag(0x10d769b, 0x0, 0x0)
	/opt/local/lib/go/src/reflect/type.go:499 +0x82 fp=0xc0200e0340 sp=0xc0200e0338 pc=0x1073182
reflect.(*structType).Field(0x10f4b60, 0x0, 0x10d769e, 0x4, 0x0, 0x0, 0x112b480, 0x10e0540, 0x0, 0x0, ...)
	/opt/local/lib/go/src/reflect/type.go:1194 +0x104 fp=0xc0200e0398 sp=0xc0200e0340 pc=0x1075df4
reflect.(*rtype).Field(0x10f4b60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/opt/local/lib/go/src/reflect/type.go:920 +0x7a fp=0xc0200e0420 sp=0xc0200e0398 pc=0x1074a2a
github.com/goccy/go-json.(*rtype).Field(...)
	~/go/pkg/mod/github.com/goccy/[email protected]/rtype.go:160
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01,0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:740 +0x10b fp=0xc0200e0688 sp=0xc0200e0420 pc=0x10aeb1b
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f800)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e0918 sp=0xc0200e0688 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e09b0, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e0958 sp=0xc0200e0918 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:33 +0x1acb fp=0xc0200e0be sp=0xc0200e0958 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e0e50 sp=0xc0200e0be8 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f700)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e10e0 sp=0xc0200e0e50 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e1178, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e1120 sp=0xc0200e10e0 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	~/:33 +0x1acb fp=0xc0200e13b0 sp=0xc0200e1120 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e1618 sp=0xc0200e13b0 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f600)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e18a8 sp=0xc0200e1618 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e1940, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e18e8 sp=0xc0200e18a8 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e1b78 sp=0xc0200e18e8 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e1de0 sp=0xc0200e1b78 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f500)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e2070 sp=0xc0200e1de0 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e2108, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e20b0 sp=0xc0200e2070 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e2340 sp=0xc0200e20b0 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e25a8 sp=0xc0200e2340 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f300)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e2838 sp=0xc0200e25a8 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e28d0, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e2878 sp=0xc0200e2838 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e2b08 sp=0xc0200e2878 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e2d70 sp=0xc0200e2b08 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f200)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e3000 sp=0xc0200e2d70 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e3098, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e3040 sp=0xc0200e3000 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e32d0 sp=0xc0200e3040 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e3538 sp=0xc0200e32d0 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f100)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e37c8 sp=0xc0200e3538 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e3860, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e3808 sp=0xc0200e37c8 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e3a98 sp=0xc0200e3808 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e3d00 sp=0xc0200e3a98 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4f000)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e3f90 sp=0xc0200e3d00 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e4028, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e3fd0 sp=0xc0200e3f90 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e4260 sp=0xc0200e3fd0 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e44c8 sp=0xc0200e4260 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4ef00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e4758 sp=0xc0200e44c8 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e47f0, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e4798 sp=0xc0200e4758 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e4a28 sp=0xc0200e4798 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e4c90 sp=0xc0200e4a28 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4ee00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e4f20 sp=0xc0200e4c90 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e4fb8, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e4f60 sp=0xc0200e4f20 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e51f0 sp=0xc0200e4f60 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e5458 sp=0xc0200e51f0 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4ed00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e56e8 sp=0xc0200e5458 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e5780, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e5728 sp=0xc0200e56e8 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e59b8 sp=0xc0200e5728 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e5c20 sp=0xc0200e59b8 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4ec00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e5eb0 sp=0xc0200e5c20 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e5f48, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e5ef0 sp=0xc0200e5eb0 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e6180 sp=0xc0200e5ef0 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e63e8 sp=0xc0200e6180 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4ea00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e6678 sp=0xc0200e63e8 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e6710, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e66b8 sp=0xc0200e6678 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e6948 sp=0xc0200e66b8 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e6bb0 sp=0xc0200e6948 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e900)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e6e40 sp=0xc0200e6bb0 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e6ed8, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e6e80 sp=0xc0200e6e40 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e7110 sp=0xc0200e6e80 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e7378 sp=0xc0200e7110 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e800)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e7608 sp=0xc0200e7378 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e76a0, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e7648 sp=0xc0200e7608 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e78d8 sp=0xc0200e7648 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e7b40 sp=0xc0200e78d8 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e700)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e7dd0 sp=0xc0200e7b40 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e7e68, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e7e10 sp=0xc0200e7dd0 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e80a0 sp=0xc0200e7e10 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e8308 sp=0xc0200e80a0 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e600)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e8598 sp=0xc0200e8308 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e8630, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e85d8 sp=0xc0200e8598 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e8868 sp=0xc0200e85d8 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e8ad0 sp=0xc0200e8868 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e500)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e8d60 sp=0xc0200e8ad0 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e8df8, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e8da0 sp=0xc0200e8d60 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e9030 sp=0xc0200e8da0 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e9298 sp=0xc0200e9030 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e400)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e9528 sp=0xc0200e9298 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e95c0, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e9568 sp=0xc0200e9528 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e97f8 sp=0xc0200e9568 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200e9a60 sp=0xc0200e97f8 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e300)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200e9cf0 sp=0xc0200e9a60 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200e9d88, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200e9d30 sp=0xc0200e9cf0 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200e9fc0 sp=0xc0200e9d30 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200ea228 sp=0xc0200e9fc0 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e100)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200ea4b8 sp=0xc0200ea228 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200ea550, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200ea4f8 sp=0xc0200ea4b8 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200ea788 sp=0xc0200ea4f8 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200ea9f0 sp=0xc0200ea788 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4e000)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200eac80 sp=0xc0200ea9f0 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200ead18, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200eacc0 sp=0xc0200eac80 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200eaf50 sp=0xc0200eacc0 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200eb1b8 sp=0xc0200eaf50 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4df00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200eb448 sp=0xc0200eb1b8 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200eb4e0, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200eb488 sp=0xc0200eb448 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200eb718 sp=0xc0200eb488 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200eb980 sp=0xc0200eb718 pc=0x10aed47
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10f4b60, 0x10f4b01, 0x10e9b40, 0x10db660, 0xc006b4de00)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:41 +0x1d31 fp=0xc0200ebc10 sp=0xc0200eb980 pc=0x10ac7f1
github.com/goccy/go-json.(*Encoder).compilePtr(0xc0000bc000, 0x10db660, 0x10e9b01, 0xc004492000, 0xc0200ebca8, 0x109d661)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:208 +0x50 fp=0xc0200ebc50 sp=0xc0200ebc10 pc=0x10acfd0
github.com/goccy/go-json.(*Encoder).compile(0xc0000bc000, 0x10db660, 0x1104801, 0x1, 0x0, 0x1)
	/U:33 +0x1acb fp=0xc0200ebee0 sp=0xc0200ebc50 pc=0x10ac58b
github.com/goccy/go-json.(*Encoder).compileStruct(0xc0000bc000, 0x10f4b60, 0x10e9b01, 0x0, 0x0, 0x0)
	~/go/pkg/mod/github.com/goccy/[email protected]/encode_compile.go:757 +0x337 fp=0xc0200ec148 sp=0xc0200ebee0 pc=0x10aed47
exit status 2

Multiple "Unmarshal" calls on the same data slice lead to corrupted data that cannot be unmarshaled

We (@symflower) are currently in the process of migrating to a faster JSON package than "encoding/json" and this project seems to be a good replacement. However, before we can benchmark any further we need to get rid of (hopefully only) this bug.

This reproducer works with "encoding/json" but not with "github.com/goccy/go-json". I tried to minimize the problem down to how we handle dynamic types with JSON. We basically have multiple "Unmarshal" calls that look at the types and then execute the right unmarshal functionality with the given type. Minimized only the calls to "UNmarshal" truly matter.

package main

import (
	"fmt"

	gojson "github.com/goccy/go-json"
)

func main() {
	data := []byte(`[
		{
		  "Body": {
			"List": [
			  {
				"nodeType": "Call"
			  },
			  {
				"nodeType": "Call"
			  }
			],
			"nodeKind": "Block",
			"nodeType": "Statement"
		  },
		  "nodeType": "Function"
		},
		{
		  "Body": {
			"List": [],
			"nodeKind": "Block",
			"nodeType": "Statement"
		  },
		  "nodeType": "Function"
		}
	  ]
	`)

	if !gojson.Valid(data) {
		panic("stop")
	}

	var a []gojson.RawMessage
	if err := gojson.Unmarshal(data, &a); err != nil {
		panic(err)
	}

	fmt.Println("Original:")
	for i, data := range a {
		fmt.Printf("%d: %s\n", i, data)
	}

	fmt.Println("when iterated while unmarshaling:")
	for i, data := range a {
		fmt.Printf("%d: %s\n", i, data)

		var b map[string]gojson.RawMessage
		if err := gojson.Unmarshal(data, &b); err != nil {
			panic(err)
		}

		var c map[string]gojson.RawMessage
		if err := gojson.Unmarshal(b["Body"], &c); err != nil {
			panic(err)
		}

		var d []gojson.RawMessage
		if err := gojson.Unmarshal(c["List"], &d); err != nil {
			panic(err)
		}
	}
}

Produces:

Original:
0: {
                  "Body": {
                        "List": [
                          {
                                "nodeType": "Call"
                          },
                          {
                                "nodeType": "Call"
                          }
                        ],
                        "nodeKind": "Block",
                        "nodeType": "Statement"
                  },
                  "nodeType": "Function"
                }
1: {
                  "Body": {
                        "List": [],
                        "nodeKind": "Block",
                        "nodeType": "Statement"
                  },
                  "nodeType": "Function"
                }
when iterated while unmarshaling:
0: {
                  "Body": {
                        "List": [
                          {
                                "nodeType": "Call"
                          },
                          {
                                "nodeType": "Call"
                          }
                        ],
                        "nodeKind": "Block",
                        "nodeType": "Statement"
                  },
                  "nodeType": "Function"
                }
1: {
                                "nodeType": "Call"
                          }                     "nodeKind": "Block",
                        "nodeType": "Statement"
                  },
                  "nodeType": "Function"
                }
panic: invalid character '"' after top-level value

goroutine 1 [running]:
main.main()
        /home/zimmski/symflower/tt.go:59 +0x6c5
exit status 2

Bug in nullBytes(), trueBytes() and falseBytes() overwriting unparsed buffer space

Discovered while trying to debug the cause for huge memory consumption by go-json, more on that in a separate issue.

Problem

At the beginning of nullBytes(), trueBytes() and falseBytes(), the code checks whether the buffer has still enough data in it left to read the whole token (null/true/false). If not, it tries to read more from the reader:

go-json/decode_string.go

Lines 236 to 241 in 4d51b8b

func nullBytes(s *stream) error {
if s.cursor+3 >= s.length {
if !s.read() {
return errInvalidCharacter(s.char(), "null", s.totalOffset())
}
}

go-json/decode_bool.go

Lines 16 to 21 in 4d51b8b

func trueBytes(s *stream) error {
if s.cursor+3 >= s.length {
if !s.read() {
return errInvalidCharacter(s.char(), "bool(true)", s.totalOffset())
}
}

go-json/decode_bool.go

Lines 38 to 43 in 4d51b8b

func falseBytes(s *stream) error {
if s.cursor+4 >= s.length {
if !s.read() {
return errInvalidCharacter(s.char(), "bool(false)", s.totalOffset())
}
}

There's two problems with that:

Overwriting remaining buffer data

s.read() overwrites everything in the buffer from the current cursor onwards. See s.readBuf(), it returns a slice beginning from the current cursor position:

return s.buf[s.cursor:]

...in which the new data is read next:
n, err := s.r.Read(buf[:last])

if the cursor isn't at the very last position of the remaining data in the buffer (s.length-1, I think), everything from the cursor position onwards gets overwritten and is lost.
This is the case in nullBytes(), trueBytes() and falseBytes(), it looks ahead and reads new data while the cursor isn't at the end of the current data left in the buffer.

Potentially insufficient data read from stream

These functions only call s.Read() once, however s.Read() isn't guaranteed to read enough bytes to include the entire value. An io.Reader, can very well only return 1 char, or even 0 (even though that's discouraged):

If some data is available but not len(p) bytes, Read conventionally returns what is available instead of waiting for more.
Implementations of Read are discouraged from returning a zero byte count with a nil error, except when len(p) == 0. Callers should treat a return of 0 and nil as indicating that nothing happened; in particular it does not indicate EOF.

https://golang.org/pkg/io/#Reader

Instead, in places like these, s.read() should be called in a loop, until it either has read enough chars to fit the entire expected value, or it returns false due to an unexpected EOF or whatever.

This also touches the memory consumption problem I have, but I'll open a separate issue for that, with some pprof data and a reproduction benchmark if I can get one to work.

Failed some benchmark

in goccy/[email protected],

$ go1.15.5 test -v -run='^$' -bench=. -benchmem .
goos: darwin
goarch: amd64
pkg: benchmark
.
.
.
BenchmarkCodeDecoder
    bench_test.go:376: Decode: EOF
--- FAIL: BenchmarkCodeDecoder
BenchmarkUnicodeDecoder
    bench_test.go:393: Decode: EOF
--- FAIL: BenchmarkUnicodeDecoder-16
BenchmarkDecoderStream
    bench_test.go:407: Decode: EOF
--- FAIL: BenchmarkDecoderStream
.
.
^C

FYI, at least passed goccy/[email protected]. I'll dig it.

Compare:
v0.1.10...v0.1.11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.