
OPERATIONAL DEFECT DATABASE
...

...
Uninitialized scalar variable The variable will contain an arbitrary value left from earlier computations. Use of an uninitialized variable /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:1100: UNINIT 121570 Declaring variable "wtRet" without initializer. /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:1168: UNINIT 121570 Using uninitialized value "wtRet".
xgen-internal-githook commented on Fri, 11 Mar 2022 09:20:36 +0000: Author: {'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'yujin-kang'} Message: SERVER-64025 Initialize wtRet and add non-zero check Branch: master https://github.com/mongodb/mongo/commit/0492ea43ae52b6102e6637b0cd745a2901e6bf06 JIRAUSER1263310 commented on Tue, 1 Mar 2022 17:12:00 +0000: Using git's pickaxe (git log -G / git log -S) it looks like this code was originally setup to like this (source: 014a3045): int wtRet; while ((wtRet = cursor->next(cursor)) == 0) { ... } if (wtRet != WT_NOTFOUND) { } In its current form, the assignment isn't in the while loop condition anymore int wtRet; while (backupBlocks.size() < batchSize) { ... if() { wtRet = (_wtBackup->cursor)->next(_wtBackup->cursor); ... } if (wtRet != WT_NOTFOUND) { }
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.