bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SEGFAULT ON TILDE EXPANSION


From: kutay üner
Subject: SEGFAULT ON TILDE EXPANSION
Date: Fri, 10 Apr 2020 17:59:13 +0300

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O0 -ggdb -Wno-parentheses -Wno-format-security
uname output: Linux hk 5.6.3-arch1-1 #9 SMP PREEMPT Thu, 09 Apr 2020
03:39:30 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.0
Patch Level: 16
Release Status: release

Description:
    Trying to tab expand a tilde causes segfault. This action requires us to
    get user entries by calling getpwent which is provided by
libnss_systemd.so
    on my system.
    If we compile bash with it's malloc implementation, libraries it depends
    on also start to use this version of malloc.
    getpwent function in libnss_systemd.so takes advantage of the C malloc
    returning max_align_t aligned memory. Bash malloc returns 8 byte
aligned
    memory which is less than 16 byte requirement on my x86-64 system. This
is the root cause of segfault.

Repeat-By:
$ echo ~u

Fix:
./configure --without-bash-malloc


reply via email to

[Prev in Thread] Current Thread [Next in Thread]