Skip to content

added offset#13

Open
SeanRooooney wants to merge 1 commit intocudf_exchangefrom
cudf_http_offset_fixed
Open

added offset#13
SeanRooooney wants to merge 1 commit intocudf_exchangefrom
cudf_http_offset_fixed

Conversation

@SeanRooooney
Copy link
Collaborator

@SeanRooooney SeanRooooney commented Oct 1, 2025

2nd attempt

dan13bauer pushed a commit that referenced this pull request Mar 6, 2026
Use sizeof(variable) instead of sizeof(type) throughout the metadata
serialization/deserialization code and protocol messages. This is safer
because if the type of a variable changes, sizeof automatically picks
up the new size.

In CudfExchangeProtocol.h:
- getSerializedSize(): sizeof(kMagicNumber), sizeof(totalSize),
  sizeof(cudfSize), sizeof(dataSizeBytes), sizeof(remainingBytes[0])
- serialize(): sizeof(kMagicNumber), sizeof(totalSize),
  sizeof(cudfSize), sizeof(dataSizeBytes), sizeof(numRemaining),
  sizeof(remainingBytes[0])
- deserializeMetadataMsg(): sizeof(magicNumber), sizeof(totalSize),
  sizeof(metaSize), sizeof(record.dataSizeBytes),
  sizeof(numRemaining), sizeof(record.remainingBytes[0])

In Acceptor.cpp: sizeof(*response) instead of sizeof(HandshakeResponse)

In CudfExchangeSource.cpp: sizeof(*handshakeReq) instead of
sizeof(HandshakeMsg), sizeof(*responseBuffer) instead of
sizeof(HandshakeResponse)

Review: @pentschev comment #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant