[SERVER-62333] MurmurHash3 getblock/putblock can overflow Created: 03/Jan/22  Updated: 29/Oct/23  Resolved: 05/Jan/22

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

Type: Bug Priority: Major - P3
Reporter: Matt Broadstone Assignee: Matt Broadstone
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-01-10
Participants:

 Description   

Changes introduced in SERVER-43148 failed to include the fixes in SERVER-37258. We should continue to use std::ptrdiff_t in this case to avoid UBSAN warnings about overflow.



 Comments   
Comment by Githook User [ 05/Jan/22 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-62333 use std::ptrdiff_t to avoid UB in MurmurHash3
Branch: master
https://github.com/mongodb/mongo/commit/46ebb678146598ce3ae12ae401732708e2e3cf01

Comment by xgen-buildbaron-user [ 05/Jan/22 ]

Ticket re-opened due to revert. compile_dist_test began a consistent failure of compile_dist_test

Comment by Githook User [ 05/Jan/22 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com'}

Message: Revert "SERVER-62333 use std::ptrdiff_t to avoid UB in MurmurHash3"

This reverts commit 863684a584bfa5b4beeffb8d2a79e735299c1de7.
Branch: master
https://github.com/mongodb/mongo/commit/fefa965f8dd1f52e727a316ddb86aa18b0cf495f

Comment by Githook User [ 05/Jan/22 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-62333 add missing include for windows
Branch: master
https://github.com/mongodb/mongo/commit/5c76d29f4c21fbfe151b858b70f3b555840a2362

Comment by Githook User [ 04/Jan/22 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-62333 use std::ptrdiff_t to avoid UB in MurmurHash3
Branch: master
https://github.com/mongodb/mongo/commit/863684a584bfa5b4beeffb8d2a79e735299c1de7

Generated at Thu Feb 08 05:54:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.