]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Try to fix github tcmalloc target failure
authorDamien Miller <djm@mindrot.org>
Mon, 24 Feb 2025 06:27:50 +0000 (17:27 +1100)
committerDamien Miller <djm@mindrot.org>
Mon, 24 Feb 2025 06:27:50 +0000 (17:27 +1100)
tcmalloc may, depending on the stacktrace generator it uses, create
pipe(2) fds during shared library initialisation. These will later
get clobbered by ssh/sshd calling closefrom() and chaos will ensue.
Tell tcmalloc to use an unwinder that doesn't pull this stuff.

.github/configs

index bcb67365a39b612eef7c15e5d69d5bb811f72206..51b5b1e13f7b40f4dc44f4a4ba31a6d0f502f50c 100755 (executable)
@@ -136,6 +136,12 @@ case "$config" in
        ;;
     tcmalloc)
        CONFIGFLAGS="--with-ldflags=-ltcmalloc"
+       # tcmalloc may, depending on the stacktrace generator it uses, create
+       # pipe(2) fds during shared library initialisation. These will later
+       # get clobbered by ssh/sshd calling closefrom() and chaos will ensue.
+       # Tell tcmalloc to use an unwinder that doesn't pull this stuff.
+       TCMALLOC_STACKTRACE_METHOD=generic_fp
+       export TCMALLOC_STACKTRACE_METHOD
        ;;
     krb5|heimdal)
        CONFIGFLAGS="--with-kerberos5"