-
Notifications
You must be signed in to change notification settings - Fork 89
Description
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/67652
Exposed a minor problem in sdbusplus in that it allows serializing a double-wrapped variant container of dbus type.
v{v{d}}
Wrapping a variant within a variant on dbus is nonsensisical. This should ideally be a compile-time error when trying to instantiate a type_id of std::variant<std::variant<types...>>.
Opening this bug just for documentation at the moment.
Here is where the read call is getting instantiated.
sdbusplus/include/sdbusplus/message/read.hpp
Line 344 in ae01928
| constexpr auto dbusType = utility::tuple_to_array(types::type_id<T1>()); |
And this is the type_id definition for std::variant. I suspect we can put a static_assert here.
https://github.com/openbmc/sdbusplus/blob/ae01928016f2983aa44f1279a2575572514953f7/include/sdbusplus/message/types.hpp#L260C75-L260C75