Golang misaligned pointer conversion

Hello,

I’m getting a panic when calling directory.CreateOrOpen with -race, it appears the memory is 4 byte aligned when golang is expecting it to be 8 byte aligned. This code is a striped down version of class-scheduling-go.html

main.go

package main

import (
// Omitted for having too many links
“log”
)

func main() {
fdb.MustAPIVersion(620)
db := fdb.MustOpenDefault()
db.Options().SetTransactionTimeout(60000) // 60,000 ms = 1 minute
db.Options().SetTransactionRetryLimit(100)

if _, err := directory.CreateOrOpen(db, string{“scheduling”}, nil); err != nil {
log.Fatal(err)
}
}

go.mod

module fdbexperiment

go 1.15

// Version 6.2.28
require github.com/apple/foundationdb/bindings/go v0.0.0-20201114170605-569ab46bf638

console output
$ go run -race main.go
fatal error: checkptr: misaligned pointer conversion

goroutine 1 [running]:
runtime.throw(0x41d1054, 0x27)
	/usr/local/Cellar/go/1.15.5/libexec/src/runtime/panic.go:1116 +0x72 fp=0xc0000a6e00 sp=0xc0000a6dd0 pc=0x40363f2
runtime.checkptrAlignment(0x55cf086, 0x419cbc0, 0x1)
	/usr/local/Cellar/go/1.15.5/libexec/src/runtime/checkptr.go:15 +0xe5 fp=0xc0000a6e30 sp=0xc0000a6e00 pc=0x4009c65
github.com/apple/foundationdb/bindings/go/src/fdb.stringRefToSlice(0x55cf086, 0xc0000a6f88, 0x1, 0x1)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/futures.go:278 +0xf6 fp=0xc0000a6e98 sp=0xc0000a6e30 pc=0x4116496
github.com/apple/foundationdb/bindings/go/src/fdb.(*futureKeyValueArray).Get(0xc000010020, 0x0, 0x0, 0x0, 0xc0000a7000, 0x0, 0x0)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/futures.go:301 +0x2ea fp=0xc0000a6fb8 sp=0xc0000a6e98 pc=0x411680a
github.com/apple/foundationdb/bindings/go/src/fdb.(*RangeIterator).Advance(0xc0000a7118, 0x0)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/range.go:225 +0xbb fp=0xc0000a7048 sp=0xc0000a6fb8 pc=0x411743b
github.com/apple/foundationdb/bindings/go/src/fdb.RangeResult.GetSliceWithError(0xc0000a02d0, 0x41f8300, 0xc00000e180, 0x41f8300, 0xc00000e1a0, 0x1, 0x0, 0x1, 0x1, 0xc000010020, ...)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/range.go:150 +0x239 fp=0xc0000a71b8 sp=0xc0000a7048 pc=0x41171b9
github.com/apple/foundationdb/bindings/go/src/fdb/directory.highContentionAllocator.allocate(0x41f99e0, 0xc0000b8120, 0x41f99e0, 0xc0000b8140, 0xc0000a02d0, 0x41f99e0, 0xc0000b8080, 0x41f99e0, 0xc0000b8140, 0x41f99e0, ...)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/directory/allocator.go:68 +0xbf9 fp=0xc0000a7490 sp=0xc0000a71b8 pc=0x413c819
github.com/apple/foundationdb/bindings/go/src/fdb/directory.directoryLayer.createOrOpen(0x41f99e0, 0xc0000b8060, 0x41f99e0, 0xc0000b8080, 0x0, 0x41f99e0, 0xc0000b8120, 0x41f99e0, 0xc0000b8140, 0x41f99e0, ...)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/directory/directoryLayer.go:123 +0xef6 fp=0xc0000a79a8 sp=0xc0000a7490 pc=0x413e836
github.com/apple/foundationdb/bindings/go/src/fdb/directory.directoryLayer.CreateOrOpen.func1(0xc0000a02d0, 0x69637d0, 0x4006958, 0xc0000a02d0, 0x0)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/directory/directoryLayer.go:181 +0x14a fp=0xc0000a7b48 sp=0xc0000a79a8 pc=0x414816a
github.com/apple/foundationdb/bindings/go/src/fdb.Database.Transact.func1(0x0, 0x0, 0x0, 0x0)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/database.go:134 +0xc5 fp=0xc0000a7be8 sp=0xc0000a7b48 pc=0x411a045
github.com/apple/foundationdb/bindings/go/src/fdb.retryable(0xc0000a7ca8, 0xc0000a7c98, 0x0, 0x0, 0x42ce4e0, 0x0)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/database.go:85 +0x39 fp=0xc0000a7c38 sp=0xc0000a7be8 pc=0x4114219
github.com/apple/foundationdb/bindings/go/src/fdb.Database.Transact(0xc0000c2058, 0xc0000cc000, 0xc000000180, 0x4d1f778, 0xc000000000, 0x400691b)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/database.go:143 +0x111 fp=0xc0000a7cd0 sp=0xc0000a7c38 pc=0x4114451
github.com/apple/foundationdb/bindings/go/src/fdb/directory.directoryLayer.CreateOrOpen(0x41f99e0, 0xc0000b8060, 0x41f99e0, 0xc0000b8080, 0x0, 0x41f99e0, 0xc0000b8120, 0x41f99e0, 0xc0000b8140, 0x41f99e0, ...)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/directory/directoryLayer.go:180 +0x179 fp=0xc0000a7d50 sp=0xc0000a7cd0 pc=0x413f759
github.com/apple/foundationdb/bindings/go/src/fdb/directory.(*directoryLayer).CreateOrOpen(0xc0000ca000, 0x41f87e0, 0xc0000c2058, 0xc0000a02c0, 0x1, 0x1, 0x0, 0x0, 0x0, 0xc000096010, ...)
	<autogenerated>:1 +0x152 fp=0xc0000a7ec8 sp=0xc0000a7d50 pc=0x414bdb2
github.com/apple/foundationdb/bindings/go/src/fdb/directory.CreateOrOpen(...)
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/directory/directory.go:190
main.main()
	/Users/drew-richardson/fdbexperiment/main.go:15 +0x166 fp=0xc0000a7f88 sp=0xc0000a7ec8 pc=0x4151ba6
runtime.main()
	/usr/local/Cellar/go/1.15.5/libexec/src/runtime/proc.go:204 +0x209 fp=0xc0000a7fe0 sp=0xc0000a7f88 pc=0x4038c69
runtime.goexit()
	/usr/local/Cellar/go/1.15.5/libexec/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0000a7fe8 sp=0xc0000a7fe0 pc=0x40690a1

goroutine 21 [syscall]:
github.com/apple/foundationdb/bindings/go/src/fdb._Cfunc_fdb_run_network(0x0)
	_cgo_gotypes.go:365 +0x67
github.com/apple/foundationdb/bindings/go/src/fdb.startNetwork.func1()
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/fdb.go:209 +0x34
created by github.com/apple/foundationdb/bindings/go/src/fdb.startNetwork
	/Users/drew-richardson/go/pkg/mod/github.com/apple/foundationdb/bindings/go@v0.0.0-20201114170605-569ab46bf638/src/fdb/fdb.go:208 +0x8e
exit status 2