vendor github.com/json-iterator/go@v1.1.12

Fix a runtime segfault when being compiled with recent versions of Go.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2079759
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-05-02 15:55:21 +02:00
parent 9921983923
commit b4845b14d9
21 changed files with 93 additions and 181 deletions

23
vendor/github.com/modern-go/reflect2/go_above_118.go generated vendored Normal file
View File

@@ -0,0 +1,23 @@
//+build go1.18
package reflect2
import (
"unsafe"
)
// m escapes into the return value, but the caller of mapiterinit
// doesn't let the return value escape.
//go:noescape
//go:linkname mapiterinit reflect.mapiterinit
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter)
func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
var it hiter
mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj), &it)
return &UnsafeMapIterator{
hiter: &it,
pKeyRType: type2.pKeyRType,
pElemRType: type2.pElemRType,
}
}