]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0650: Vim aborts at startup when built with the example -O2 CFLAGS v9.2.0650
authorHirohito Higashi <h.east.727@gmail.com>
Mon, 15 Jun 2026 18:20:15 +0000 (18:20 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 15 Jun 2026 18:20:15 +0000 (18:20 +0000)
commitdd4fbdb392e72097a67da20838216d9b9600363b
treefb4df78a342a97b4bfd5311b71e69d137f434efa
parent522a39a48962f43dabcd5e568c1ee78799599e94
patch 9.2.0650: Vim aborts at startup when built with the example -O2 CFLAGS

Problem:  Building with an optimizing example CFLAGS line in src/Makefile
          (which bypasses configure) aborts Vim at startup with a buffer
          overflow, because the compiler then defaults _FORTIFY_SOURCE to
          a level >= 2 (user202729)
Solution: Define FORTIFY_CFLAGS with -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
          and reference it from the optimizing example CFLAGS lines, the
          same pin configure already applies; at higher levels the check
          false-positives on the "x[1] but actually longer" struct-hack
          arrays.

fixes:  #20526
closes: #20530

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/Makefile
src/version.c