IPC: Unsound handling of bools
The IPC serialization code assumes that any POD type can be communicated by simply copying the memory. This is a problem if not every possible sequence of bytes represents a valid value.
In particular, the assumption opens the possibility of sending spooky bools which behave as true in some contexts and false in others, or have values other than 0 or 1 after an integer promotion.
Of course it's easy to make a specialization for bool itself, but bools in structs pose much more of a problem. There are various large structs which are serialized by copying, some of which contain bools. Maybe we would need some static analysis to prevent any bools from being added to them.
ya, we've had this issue with vector bools as well...though we just made a specialization for it.
vector<bool> is a different issue: when you index into it you get a proxy object instead of bool& and the serialization code wouldn't/shouldn't know how to copy the proxy object.