xorg-server: disable false positive buffer overrun check

The bounds checks introduced by `-D_FORTIFY_SOURCE=2` in functions
like `strlcpy` interact poorly with data structures that treat fixed
sized arrays as flexible arrays (e.g. `struct sockaddr`).  This bug
manifested as an endless crashloop in XQuartz.

See also https://github.com/llvm/llvm-project/issues/29694
This commit is contained in:
George Huebner
2026-06-25 15:58:59 -07:00
parent eb4202e428
commit 44f2933184
+3
View File
@@ -176,6 +176,9 @@ stdenv.mkDerivation (finalAttrs: {
--subst-var-by XQUARTZ_APP "$out/Applications/XQuartz.app"
'';
# avoid linux rebuilds
${if stdenv.hostPlatform.isDarwin then "hardeningDisable" else null} = [ "strictflexarrays1" ];
# default X install symlinks this to Xorg, we want XQuartz
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
ln -sf $out/bin/Xquartz $out/bin/X