2 Commits

Author SHA1 Message Date
Pavel Skripkin
893a303962
[clang][analyzer] Support ownership_{returns,takes} attributes (#98941)
Add support for checking mismatched ownership_returns/ownership_takes attributes.

Closes #76861
2024-07-24 13:15:08 +02:00
Alejandro Álvarez Ayllón
67c6ad6f30
[clang][analyzer] Model allocation behavior or getdelim/geline (#83138)
`getdelim` and `getline` may free, allocate, or re-allocate the input
buffer, ensuring its size is enough to hold the incoming line, the
delimiter, and the null terminator.

`*lineptr` must be a valid argument to `free`, which means it can be
either

1. `NULL`, in which case these functions perform an allocation
equivalent to a call to `malloc` even on failure.
2. A pointer returned by the `malloc` family of functions. Other
pointers are UB (`alloca`, a pointer to a static, to a stack variable, etc.)
2024-03-06 16:52:18 +01:00