Re: segfault in errx
* Florian Weimer:
>> I can reproduce something like this with 2.24-3 on amd64. valgrind
>> isn't very helpful.
>
> And it needs a UTF-8 locale (C.UTF-8 will do). Another multi-byte
> locale may work as well.
Bisecting this with the attached script leads to:
commit 18d26750dd8fd328a78cf639fd0ec2494680a2a4
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Sun Mar 8 09:46:53 2015 -0700
Cleanup: in preparation for fixing BZ #16734, fix memory leaks exposed by
switching fopen()ed streams from mmap to malloc.
This commit has shown up in other context as well:
<https://sourceware.org/bugzilla/show_bug.cgi?id=20598>
#!/bin/bash
set -x
unset LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
LC_IDENTIFICATION LC_ALL
fatal () {
exit 255
}
skip () {
exit 255
}
run () {
GCONV_PATH=./iconvdata LOCPATH=. ./elf/ld-linux-x86-64.so.2 --library-path .:./math:./elf:./dlfcn:./nss:./nis:./rt:./resolv:./crypt:./mathvec:./nptl "$@"
}
cd ../build || fatal
rm -rf ../build/* || fatal
../git/configure --prefix=/usr --disable-werror || skip
make -j12 || skip
run locale/localedef -f ../git/localedata/charmaps/UTF-8 -i ../git/localedata/locales/en_US "$PWD/en_US.UTF-8" || skip
LC_ALL=en_US.UTF-8 run /usr/bin/ul /tmp/ul.segf
case $? in
1)
exit 0
;;
139)
exit 1
;;
*)
fatal
;;
esac
Reply to: