[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

Mikael Holmén via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 02:28:54 PDT 2024


mikaelholmen wrote:

> We're seeing a crash with this patch when compiling with -Weverything.
> 
> ```
> clang: ../../clang/include/clang/AST/Expr.h:3026: const clang::Expr *clang::CallExpr::getArg(unsigned int) const: Assertion `Arg < getNumArgs() && "Arg access out of range!"' failed.
> ```
> 
> I'm working on extracting a reproducer.

```clang -c -Weverything bbi-98867.c```
with bbi-98867.c being just
```
void printf() { printf(); }
```
(I've creduced the reproducer, I can't share the full one)

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


More information about the cfe-commits mailing list