cheri-c-programming
cheri-c-programming copied to clipboard
Discourage use of tags to implement logic
Tags could be seen as an interesting feature to implement logic that behaves differently depending on whether a pointer or an integer value was passed to a function. This triggers two issues:
- Relying on tags to distinguish pointers from integer values does not distinguish valid and invalid pointers, and it's simply invalid.
- Relying on tags makes it harder to upstream changes.
The document should make a developer aware of consequences of such decision.
It also violates the principle of intentional use (one of the two underlying principles of CHERI).