[clang] [clang][Sema] Avoid out-of-memory crash on huge designated initializer indices (PR #205503)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 16:58:18 PDT 2026


efriedma-quic wrote:

LLVM can handle IR like the following without ever explicitly allocating memory for the array:

```
@g = global {[1000000000000 x i32], i32} {[1000000000000 x i32] zeroinitializer, i32 3}
```

Of course, you hit an out-of-disk-space error if you try to compile this to an object file.

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


More information about the cfe-commits mailing list