Say, we have this enum:
enum TestEnum {
case A;
case B;
}
and we serialize TestEnum::B. Then, in another environment we unserialize while having another enum definition:
enum TestEnum {
case A;
}
In this scenario, msgpack_unserialize will spit out a segmentation fault. The same will happen, if the enum definition would look like this:
enum TestEnum {
case A;
public const B = 42;
}
In conclusion: When unserializing an enum value, a check if the specified case even exists seems to be missing, leading to SegFault.
Say, we have this enum:
and we serialize
TestEnum::B. Then, in another environment we unserialize while having another enum definition:In this scenario,
msgpack_unserializewill spit out a segmentation fault. The same will happen, if the enum definition would look like this:In conclusion: When unserializing an enum value, a check if the specified case even exists seems to be missing, leading to SegFault.