Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Section 2.9: Do runtimes have to detect invalid handles or not? #6
In the fundamentals chapter it is stated that:
This looks like runtimes are allowed to just cast internal object pointers to handles and to leave invalid handle detection to the validation layers. But in several function descriptions the opposite is stated, for example:
Is it must or may? Are runtimes required to implement invalid handle detection or not?
This, among other inconsistencies you've seen, is the result of back-and-forth design decisions in this area. The current intent was that runtimes are not required to validate handles (i.e. undefined behavior). Like you suggest, these musts should be mays or the sentence should be removed entirely. The intent is that developers use the validation layer to ensure the application is correctly written (e.g. only using valid handles).