-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, BSONElement accessors do not validate that the type expected by the API matches the actual contents of the referred-to element. Identify a way to add type checking to BSONElement accessors with an acceptable performance overhead. To maximize chance of success, we can consider it a programmer error to call accessors in a type-mismatched fashion and use tassert or low-overhead server-aborting mechanisms like MONGO_UNREACHABLE or __builtin_trap().