Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
3.5.6
-
None
-
Fully Compatible
-
ALL
-
Platforms 2017-05-08
-
0
Description
The constructor for ServerStatusSection calls a non-static method on the CmdServerStatus class. Depending on the order of construction of the different sections, this invocation may happen before CmdServerStatus has been constructed.
This was discovered through UBSAN:
src/mongo/db/commands/server_status.cpp:196:21: runtime error: member call on address 0x55555cfde1d8 which does not point to an object of type 'mongo::CmdServerStatus'
|
0x55555cfde1d8: note: object has invalid vptr
|
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
^~~~~~~~~~~~~~~~~~~~~~~
|
invalid vptr
|
Since CmdServerStatus::_sections is static it doesn't need to be accessed through a non-static function.
Attachments
Issue Links
- is duplicated by
-
SERVER-11589 Initialization order fiasco between dataFileSync and cmdServerStatus
-
- Closed
-