Add a new configure option to initialize automatic variables
The new option, `--enable-auto-var-init`, when enabled, sets the
`-ftrivial-auto-var-init` flag when supported by the compiler
(GCC 12+, clang 16+) to either:
- `zero`: zero-initializes all automatic variables, and is enabled
with `--enable-auto-var-init=yes` or `--enable-auto-var-init=zero`.
This can be used as a hardening measure in production, reducing
information leakage issues.
- `pattern`: initialize all automatic variables to a pattern that
is likely to be detected, like 0xAA, and is enabled via
`--enable-auto-var-init=pattern`. This is useful in tests,
especially when the cost of sanitizers is too high.
I have not done any performance testing, but the zero option is
generally considered to have a less than 5% performance cost.