[SERVER-67765] Coverity analysis defect 122493: Division or modulo by zero Created: 02/Jul/22  Updated: 27/Oct/23  Resolved: 19/Sep/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Matthew Saltz (Inactive)
Resolution: Gone away Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Sprint: Execution Team 2022-10-03
Participants:

 Description   

Division or modulo by zero

The program will have undefined behavior, likely a crash. Division or modulo by zero results in undefined behavior.
/src/mongo/db/catalog/multi_index_block.cpp:782: DIVIDE_BY_ZERO 122493 Assigning: "kYieldIterations" = "this->isBackgroundBuilding() ? mongo::internalIndexBuildBulkLoadYieldIterations.load() : 0". The value of "kYieldIterations" is now 0.



 Comments   
Comment by Eric Milkie [ 19/Sep/22 ]

(I used this view to see all the outstanding defects in the latest snapshot: https://coverity.corp.mongodb.com/reports.htm#v16212/p10001 )

Comment by Eric Milkie [ 19/Sep/22 ]

I tried syncing to July 1 where this was first detected, but I can't find any division there either.
I checked the "all defects" view for the latest snapshot and sorted by Defect type, then jumped to the Division By Zero section and I didn't see any for this file, so I think we can safely say it's gone away by now.

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