[SERVER-71413] RecordData should store size as unsigned Created: 16/Nov/22  Updated: 27/Mar/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Matt Kneiser Assignee: Matt Kneiser
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-74715 BSONObj::objsize() should return a si... Backlog
Participants:

 Description   

The RecordData class uses a signed int to store its size and implicitly converts it to size_t }}in a few places like calls to {{memcpy() and SharedBuffer::allocate().

Since there is no sentinel value for having a negative size, size should be stored as unsigned.

 

The outdated TODO in the file can be removed as well.


Generated at Thu Feb 08 06:18:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.