-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Fully Compatible
-
Programmability 2026-01-05
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In a patch build here testing an upgrade of MSVC, we observed some failures in idl_test. From some digging, the problem is that we're taking the wrong branch in the initialization of the _serializationContext member of BypassReplyStruct. The generated code for that looks like this:
_serializationContext(serializationContext.value_or(_isCommandReply ? SerializationContext::stateCommandReply() : SerializationContext::stateDefault())),
_isCommandReply is a static constexpr bool member and is true, but we take the false branch (confirmed through some logging in a local run). This only happens with optimization enabled. If I add another pointless int member to the class and make its initialization dependent on _isCommandReply, then we start taking the correct branch.
These observations may point to the compiler inferring UB somewhere if _isCommandReply is true.
- is depended on by
-
SERVER-116297 bump msvc version to 14.44.35207
-
- Closed
-