[clang] [compiler-rt] [libcxx] [clang][Sema] Add fortify warnings for `unistd.h` (PR #161737)

Colin Kinloch via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 5 08:35:20 PST 2026


ColinKinloch wrote:

I'm uncertain about defining `ssize_t`. Is it safe to assured to be equivalent to `signed size_t`?
The man pages say that `ssize_t` "It is a signed integer type capable of storing values at least in the range [-1, SSIZE_MAX].", which doesn't say anything about it's relation to size_t.
Would it be better to add the `IgnoreSignature` attribute on the `read` like builtins, add type checking to `CheckBuiltinFunctionCall` and then call `checkFortifiedBuiltinMemoryFunction` to do the checks only if it is verified to returns a defined `ssize_t` type?

https://github.com/llvm/llvm-project/pull/161737


More information about the cfe-commits mailing list