encoding/json: unmarshaling into a struct from json fails with "reflect: Field index out of range" #66762
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Go version
go version go1.22.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
using datadog(https://github.com/DataDog/dd-trace-go) tries to marshal/unmarshal serveral structs as json. Sporadically the marshal/unmarshal of traces and logs fails (even tho the source data look fine).
For example (input data - input data was verified via debugging when the panic occured)
which is unmarshalled here:
tracer/sampler.go
What did you see happen?
a panic occured:
the weird thing here is that the index of the field (whiuch is trying to be accessed) is very very high
0x3ff2d679f1f26f
= 17999926515593839 and looks more like a pointer/address to me.reflect/value.go

What did you expect to see?
the marshal should work find (as the json and the struct look fine to me).
The text was updated successfully, but these errors were encountered: