List set on generic capability's Param type invalid when unmarshalled
lthibault opened this issue · comments
I have added a unit test to the bugfix/invalid-ptr
branch that isolates this bug. To run it:
go test -run '^TestGenericCaps$' capnproto.org/go/capnp/v3
The output is:
Running tool: /usr/local/go/bin/go test -timeout 10s -run ^TestGenericCaps$ capnproto.org/go/capnp/v3
--- FAIL: TestGenericCaps (0.00s)
--- FAIL: TestGenericCaps/MarshalAndUnmarshal (0.00s)
/Users/lthibault/Go/src/capnproto.org/go/capnp/integration_test.go:1694:
Error Trace: integration_test.go:1694
Error: Should be true
Test: TestGenericCaps/MarshalAndUnmarshal
FAIL
FAIL capnproto.org/go/capnp/v3 0.172s
FAIL
Observe the following:
- We are able to read the list back from
air.Sender_send_Params
after it has been set (subtest 1). - The List pointer is invalid after unmarshaling (subtest 2)
@zenhack Any idea what might be going on, here?
Invalid. I was using NewSender_send_Params
instead of NewRootSender_send_Params
.