Skip to content

Commit 223b83c

Browse files
committed
Merge #250128: bash: disable bash-malloc everywhere
...into staging
2 parents 3d5e8ad + 8708ae0 commit 223b83c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkgs/shells/bash/5.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ stdenv.mkDerivation rec {
6868
];
6969

7070
configureFlags = [
71+
# At least on Linux bash memory allocator has pathological performance
72+
# in scenarios involving use of larger memory:
73+
# https://lists.gnu.org/archive/html/bug-bash/2023-08/msg00052.html
74+
# Various distributions default to system allocator. Let's nixpkgs
75+
# do the same.
76+
"--without-bash-malloc"
7177
(if interactive then "--with-installed-readline" else "--disable-readline")
7278
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
7379
"bash_cv_job_control_missing=nomissing"
@@ -81,7 +87,6 @@ stdenv.mkDerivation rec {
8187
"bash_cv_dev_fd=standard"
8288
"bash_cv_termcap_lib=libncurses"
8389
] ++ lib.optionals (stdenv.hostPlatform.libc == "musl") [
84-
"--without-bash-malloc"
8590
"--disable-nls"
8691
];
8792

0 commit comments

Comments
 (0)