-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding/json: fix panic for nil instances of TextMarshaler in map keys #33700
Conversation
This PR (HEAD: 9695e03) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/190697 to see it. Tip: You can toggle comments from me using the |
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Daniel Martí: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from William Poussier: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Daniel Martí: Patch Set 2: (1 comment) Thanks. The tree hasn't opened yet for 1.14 unfortunately, so let's pick this up again in a week or two. Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from William Poussier: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
This PR (HEAD: 0ace442) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/190697 to see it. Tip: You can toggle comments from me using the |
Message from William Poussier: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
@mvdan Sorry, I messed the commit message (wrong issue ID) and didn't knew it would create a new patchset for each operation :( |
No worries :) |
Message from William Poussier: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Daniel Martí: Patch Set 7: Run-TryBot+1 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Gobot Gobot: Patch Set 7: TryBots beginning. Status page: https://farmer.golang.org/try?commit=3cf8b99e Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Gobot Gobot: Patch Set 7: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes #33675
This PR (HEAD: 6c987c9) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/190697 to see it. Tip: You can toggle comments from me using the |
Message from William Poussier: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Daniel Martí: Patch Set 8: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Gobot Gobot: Patch Set 8: TryBots beginning. Status page: https://farmer.golang.org/try?commit=5bb3e586 Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from William Poussier: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
Message from Gobot Gobot: Patch Set 8: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes #33675 Change-Id: I0a04cf690ae67006f6a9c5f8cbb4cc99d236bca8 GitHub-Last-Rev: 6c987c9 GitHub-Pull-Request: #33700 Reviewed-on: https://go-review.googlesource.com/c/go/+/190697 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
Message from Daniel Martí: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/190697. |
This PR is being closed because golang.org/cl/190697 has been merged. |
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes golang#33675 Change-Id: I0a04cf690ae67006f6a9c5f8cbb4cc99d236bca8 GitHub-Last-Rev: 6c987c9 GitHub-Pull-Request: golang#33700 Reviewed-on: https://go-review.googlesource.com/c/go/+/190697 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes #33675 Change-Id: I0a04cf690ae67006f6a9c5f8cbb4cc99d236bca8 GitHub-Last-Rev: 6c987c90846f854e21814dbfb3a073605ec8a94c GitHub-Pull-Request: golang/go#33700 Reviewed-on: https://go-review.googlesource.com/c/go/+/190697 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes #33675 Change-Id: I0a04cf690ae67006f6a9c5f8cbb4cc99d236bca8 GitHub-Last-Rev: 6c987c90846f854e21814dbfb3a073605ec8a94c GitHub-Pull-Request: golang/go#33700 Reviewed-on: https://go-review.googlesource.com/c/go/+/190697 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes #33675 Change-Id: I0a04cf690ae67006f6a9c5f8cbb4cc99d236bca8 GitHub-Last-Rev: 6c987c90846f854e21814dbfb3a073605ec8a94c GitHub-Pull-Request: golang/go#33700 Reviewed-on: https://go-review.googlesource.com/c/go/+/190697 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
This change adds a a check in the encodeWithString.resolve method to ensure that a reflect.Value with kind Ptr is not nil before the type assertion to TextMarshaler. If the value is nil, the method returns a nil error, and the map key encodes to an empty string. Fixes #33675 Change-Id: I0a04cf690ae67006f6a9c5f8cbb4cc99d236bca8 GitHub-Last-Rev: 6c987c90846f854e21814dbfb3a073605ec8a94c GitHub-Pull-Request: golang/go#33700 Reviewed-on: https://go-review.googlesource.com/c/go/+/190697 Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
This change adds a a check in the encodeWithString.resolve method
to ensure that a reflect.Value with kind Ptr is not nil before
the type assertion to TextMarshaler.
If the value is nil, the method returns a nil error, and the map key
encodes to an empty string.
Fixes #33675