Closed ttssokorac closed 4 months ago
Was just chatting with @mtopalovicTT and this issue came up, this is almost certainly because of Flatbuffer::store
in binary.cpp
which uses the prefix size to store the flatbuffer, but this doesn't include the size of the prefix itself. I think it's missing a + sizeof(flatbuffers::uoffset_t)
.
This would correspond to the last bytes just being truncated, which I guess is where grid.x happens to live.
We should use GetSizePrefixedBufferLength
instead of GetPrefixedSize
during store.
GetPrefixedSize
returns size of the flat buffer which doesn't include size prefix
Great find! Yes, let's use that API
Yes, I verified that using GetSizePrefixedBufferLength instead of GetPrefixedSize fixes the thing. I will send out PR shortly to fix this.
On a wormhole system,
ttrt query --system-desc
returns correct info (truncated):But, when the system desc is saved to a file, and re-read, the grid_size.x is corrupted:
The rest of the fields seem correct.