Issue |
91385
|
Summary |
libc++ iota constructor check hardened mode
|
Labels |
libc++
|
Assignees |
|
Reporter |
gonzalobg
|
@ldionne do you think that checking in `iota_view` constructor whether "bound is reachable from value" (pre-condition) would be a suitable check for hardened mode?
That would catch synthetic cases like:
```c++
iota(10, 5);
```
but also more common cases like:
```c++
iota(0, (int)vec.size());
```
where `(int)vec.size()` wraps around and ends up negative.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs