Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.5.0
-
Untriaged
-
Unknown
Description
UBSan reports an error when we (deliberately) encode an invalid value for in an enum - for example protocol_binary_subdoc_flag in test code:
kv_engine/protocol/connection/client_mcbp_commands.cc:510:36:
|
runtime error: load of value 255, which is not a valid value for type 'protocol_binary_subdoc_flag'
|
This is because we use an unscoped enum (protocol_binary_subdoc_flag) without an underlying fixed type, and we deliberately assign a value which is outside the set of defined subdoc_flag values.