DavidSpickett marked 2 inline comments as done.
DavidSpickett added inline comments.
================
Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:1464
+ // get all tags back.
+ while (num_tags > 0) {
+ tags_vec.iov_base = dest;
----------------
omjavaid wrote:
> this loop condition is is a little fishy. num_tags is unsigned which means
> if by chance it doesnt end up going to zero we ll keep looping for ever.
I couldn't see another loop condition that made sense to use, so I've added an
assert below:
```
assert(tags_read && (tags_read <= num_tags));
```
If num_tags was 0 we'd never enter the loop in the first place. Then we assert
that if there was no error, the kernel returned at least 1 tag and no more tags
than we asked for.
This should prevent num_tags wrapping around 0 and causing an infinite loop.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95601/new/
https://reviews.llvm.org/D95601
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits