When -ftrivial-auto-var-init= is enabled, allocas unconditionally
receive auto-initialization since [1].
In certain cases, it turns out, this is causing problems. For example,
when using alloca to add a random stack offset, as the Linux kernel does
on syscall entry [2]. In this case, none of the alloca'd stack memory is
ever used, and initializing it should be controllable; furthermore, it
is not always possible to safely call memset (see [2]).
Introduce __builtin_alloca_uninitialized() (and
__builtin_alloca_with_align_uninitialized), which never performs
initialization when -ftrivial-auto-var-init= is enabled.
[1] https://reviews.llvm.org/D60548
[2] https://lkml.kernel.org/r/YbHTKUjEejZCLyhX@elver.google.com
For the sake of completeness, shall we also implement an uninitialized version of __builtin_alloca_with_align()?