Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: L A Walsh Newsgroups: gnu.bash.bug Subject: building bash 5.x problems+coredumps Date: Mon, 08 Jul 2019 15:43:51 -0700 Lines: 133 Approved: bug-bash@gnu.org Message-ID: References: <5D23C727.9030405@tlinx.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1562625841 30895 209.51.188.17 (8 Jul 2019 22:44:01 GMT) X-Complaints-To: action@cs.stanford.edu To: bug-bash Envelope-to: bug-bash@gnu.org User-Agent: Thunderbird X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 173.164.175.65 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <5D23C727.9030405@tlinx.org> Xref: csiph.com gnu.bash.bug:15091 This hasn't worked for me yet, that I remember. Some of itt may be in so= me library I'm linking, but not sure what might be causing the problem. In making bash with the 7 patches, I get various warnings and a coredump:= =2E -I../../lib -fpic -march=3Dnative -pipe -flto -Wl,--no-as-needed -Og= -g3 -ggdb -Wno-parentheses -Wno-format-security shell.c In file included from ../bashintl.h:30, from ./umask.def:57: =2E/umask.def: In function =E2=80=98umask_builtin=E2=80=99: =2E./include/gettext.h:46:26: warning: passing argument 2 of =E2=80=98sh_= erange=E2=80=99 discards =E2=80=98const=E2=80=99 qualifier from pointer target type [-Wdi= scarded-qualifiers] # define gettext(Msgid) ((const char *) (Msgid)) ~^~~~~~~~~~~~~~~~~~~~~~~ =2E./bashintl.h:36:18: note: in expansion of macro =E2=80=98gettext=E2=80= =99 #define _(msgid) gettext(msgid) ^~~~~~~ =2E/umask.def:115:37: note: in expansion of macro =E2=80=98_=E2=80=99 sh_erange (list->word->word, _("octal number")); ^ In file included from /usr/include/features.h:428, from /usr/include/bits/libc-header-start.h:33, from /usr/include/wchar.h:27, from ../config-bot.h:144, from ../config.h:1206, from ./umask.def:42: common.h:98:36: note: expected =E2=80=98char *=E2=80=99 but argument is o= f type =E2=80=98const char *=E2=80=99 extern void sh_erange __P((char *, char *)); ^~~~~~ Then later (final link) rm -f bash /usr/bin/gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde -L./lib/malloc -L./lib/sh -fpic -march=3Dnative -pipe -flt= o -Wl,--no-as-needed -Og -g3 -ggdb -Wl,--default-imported-symver -Wl,--default-symver -Wl,--stats -rdynamic -fpic -march=3Dnative -pipe -flto -Wl,--no-as-needed -Og -g3 -ggdb -Wno-parentheses -Wno-format-security -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lglob -lsh -lreadline -lhistory -ltermcap -ltilde -lmalloc -ldl /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: DWARF error: could not find abbrev number 88 /tmp/ccAfK8Jm.ltrans3.ltrans.o: in function `sh_mktmpname': :(.text+0xb896): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp' /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: total time in link: 0.258463 ls -l bash -rwxrwxr-x 1 law lawgroup 5686848 Jul 8 14:51 bash size bash text data bss dec hex filename 1062017 47272 40256 1149545 118a69 bash Ishtar:tools/bash/bash-5.0> ./bash malloc: subst.c:4701: assertion botched free: called with unallocated block argument Aborting...Aborted (core dumped) I get some type of Dwarf error, then it didn't like mktemp, and finally something in a local startup file causes a coredump Of note, disabling the the startup files: bash --norc --noprofile malloc: subst.c:4701: assertion botched free: called with unallocated block argument Aborting... malloc: subst.c:4701: assertion botched free: called with unallocated block argument Aborting...Ishtar:> # it starts the new shell, but pressing carriage return gives me: malloc: subst.c:4701: assertion botched free: called with unallocated block argument Aborting... malloc: subst.c:4701: assertion botched free: called with unallocated block argument Aborting...Ishtar:> # and back to the prompt again. Very odd. I tried the build both without saying anything about what malloc to use, then with used option --with-bash-malloc -- both seem to do the same thing. Config looks like: prefix=3D, eprefix=3D, lib=3D, libdir=3D. setting flags for link-time-optimize: add -flto -Wl,--no-as-needed setting flags for debug: add -Og -g3 -ggdb prefix=3D/, eprefix=3D/ libdir=3D/lib64 -fpic -march=3Dnative -pipe -flto -Wl,--no-as-needed -Og -g3 -ggdb -fpic -march=3Dnative -pipe -flto -Wl,--no-as-needed -Og -g3 -ggdb -Wl,--default-imported-symver -Wl,--default-symver -Wl,--stats CFLAGS=3D"$CFLAGS" LD_FLAGS=3D"$LDFLAGS" ./configure "--prefix=3D/ --bindir=3D/bin --sbindir=3D/sbin --datadir=3D/share --includedir=3D/incl= ude --oldincludedir=3D/usr/include --libdir=3D/lib64 --libexecdir=3D/lib64/ba= sh --localstatedir=3D/var --sharedstatedir=3D/com --sysconfdir=3D/etc --enable-alias --enable-arith-for-command --enable-array-variables --enable-brace-expansion --enable-casemod-attributes --enable-casemod-expansions --enable-command-timing --enable-cond-command --enable-cond-regexp --enable-coprocesses --enable-debugger --enable-directory-stack --enable-disabled-builtins --enable-dparen-arithmetic --enable-extended-glob --enable-extended-glob-default --enable-function-import --enable-glob-asciiranges-default --enable-help-builtin --enable-history --enable-job-control --enable-multibyte --enable-net-redirections --enable-process-substitution --enable-progcomp --enable-prompt-string-decoding --enable-readline --enable-select --enable-single-help-strings --disable-nls --disable-rpath --with-bash-malloc --with-gnu-ld" checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu =2E..