Issue 107789
Summary span does not check or null on construction in hardening modes
Labels new issue
Assignees
Reporter beached
    The following code in hardening does not check that the range is valid when it can.  null, 0 is valid but null, N > 0 is UB

```cpp
int main( ) {
    constexpr int * p = nullptr;
 return foo( std::span<int>(p, 5) );
}
``` 

should error with a check that if It is null, size == 0 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to