Closed clavin-xlnx closed 3 years ago
+1
Thanks for the report! This was an integer overflow problem. It is fixed in https://github.com/capnproto/capnproto-java/commit/eb73990798758bd08bc9411127a95749df4847dc.
I have published 0.1.6 with this change to the central repository.
We are using capnproto-java to encode a large FPGA device database but we have run into what seems a bug or limitation (see Xilinx/RapidWright#176). When we have essentially a long list of arrays, we get an error on read of the message similar to:
It appears that there is a limit set of 512 segments that can be read which is fine (legitimate security precaution). However, when using capnproto-java to encode this data, it generates several thousand segments for some reason. I have some example code that can reproduce this issue with our existing schema (see Gist: https://gist.github.com/clavin-xlnx/1688dfaf0e708737c2743577111a4c7f):
To reproduce the error, run the following:
For reference, the original schema used to generate the DeviceResources.java file can be found here: https://github.com/SymbiFlow/fpga-interchange-schema/blob/04bc92a22306351e1b848a6d8a3fd7720c4aed58/interchange/DeviceResources.capnp