RFR: 8345627: [REDO] Use gcc12 -ftrivial-auto-var-init=pattern in debug builds

Magnus Ihse Bursie ihse at openjdk.org
Fri Dec 13 08:46:08 UTC 2024


This is a retry to add `-ftrivial-auto-var-init=pattern` to gcc debug builds. The first attempt was buggy in multiple ways and had to be backed out.

This is the description of the original bug report:

gcc12 has added -ftrivial-auto-var-init=<choice>, which specifies how automatic variables without an initializer should be initialized. The default choice is "uninitialized", which is the default C/C++ behavior. Alternatives are "pattern" and "zero". For improved debugging, helping to detect uninitialized uses, the "pattern" choice should be used.

-------------

Commit messages:
 - Try filtering out -ftrivial-auto-var-init=pattern for libsleef. This patch is getting uglier by the minute...
 - Only add flag if it is supported
 - 8345627: [REDO] Use gcc12 -ftrivial-auto-var-init=pattern in debug builds

Changes: https://git.openjdk.org/jdk/pull/22691/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22691&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8345627
  Stats: 14 lines in 4 files changed: 13 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/22691.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22691/head:pull/22691

PR: https://git.openjdk.org/jdk/pull/22691


More information about the build-dev mailing list