From 5c5ab2bc12472f63a33cc841dcdc57f1ed8ddea5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 12 Aug 2010 13:34:34 +0000 Subject: [PATCH] * Don't link against pthreads. This was added way back in r211 because Berkeley DB needed it on some platforms, but we don't use BDB anymore. On FreeBSD, if you link against pthreads, then the main thread gets a 2 MB stack which cannot be overriden (it ignores "ulimit -s"): http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg62445.html This is not enough for Nix. For instance, the garbage collector can fail if there is a pathologically deep chain of references (http://hydra.nixos.org/build/556199). 2 MB is also not enough for many Nix expressions. Arguably the garbage collector shouldn't use recursion, because in NixOS unprivileged users can DOS the garbage collector by creating a sufficiently deeply nested chain of references. But getting rid of recursion is a bit harder. --- configure.ac | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure.ac b/configure.ac index 867e29029..0b7f89448 100644 --- a/configure.ac +++ b/configure.ac @@ -256,9 +256,6 @@ AC_SUBST(sqlite_include) AC_SUBST(sqlite_bin) -AC_CHECK_LIB(pthread, pthread_mutex_init) - - AC_ARG_ENABLE(init-state, AC_HELP_STRING([--disable-init-state], [do not initialise DB etc. in `make install']), init_state=$enableval, init_state=yes)