go icon indicating copy to clipboard operation
go copied to clipboard

FATAL error:segmentation violation when marshal map

Open sensejoy opened this issue 3 years ago • 1 comments

go version: go1.18.3

test code:

package main

import ( "github.com/json-iterator/go" )

func main() { var req = map[string]interface{}{ "a": "b", } jsoniter.Marshal(req) }

got: unexpected fault address 0xb01dfacedebac1e fatal error: fault [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x105b8df] ...

sensejoy avatar Sep 22 '22 08:09 sensejoy

Try use github.com/json-iterator/go v1.1.12 refer: https://github.com/json-iterator/go/issues/608

cnanl avatar Sep 30 '22 08:09 cnanl