(gdb) bt #0 0x00007efd7f4005e0 in termattrs_sp () from /lib64/libncursesw.so.6 #1 0x00007efd7f3fccb7 in _nc_setupscreen_sp () from /lib64/libncursesw.so.6 #2 0x00007efd7f3f758e in newterm_sp () from /lib64/libncursesw.so.6 #3 0x00007efd7f3f7aab in newterm () from /lib64/libncursesw.so.6 #4 0x000055702c113848 in get_newterm_aux () #5 0x000055702c115d54 in start_ncurses () #6 0x000055702c0e2937 in main () likely same thing as e.g. https://bugs.gentoo.org/651914, also judging from what is being done in configure.ac (quick check only): hard-coded -ltinfo. app-admin/testdisk is 7.1_pre20180322 TERM is xterm-256color
also: bug 654870 about cfdisk from sys-apps/util-linux-2.30.2-r1
I don't know libncurses but in case libncuses(w) and libtinfo(w) should be paired, here they are not: > readelf -d /usr/bin/testdisk | grep NEEDED 0x0000000000000001 (NEEDED) Shared library: [libncursesw.so.6] 0x0000000000000001 (NEEDED) Shared library: [libtinfo.so.6] 0x0000000000000001 (NEEDED) Shared library: [libreiserfs-0.3.so.0] 0x0000000000000001 (NEEDED) Shared library: [libuuid.so.1] 0x0000000000000001 (NEEDED) Shared library: [libntfs-3g.so.88] 0x0000000000000001 (NEEDED) Shared library: [libext2fs.so.2] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
same problem here, but using sys-libs/ncurses -tinfo in package useflags segfault is gone
What (virtual) terminal are you using?
i'm using xterm-256color.
Attaching a patch that fixes the problem (tested on the USE=tinfo, has tinfow case). I don't have much experience with this build system so it may be not up to standards, I don't know.
Created attachment 537260 [details, diff] fix
(In reply to Sławomir Nizio from comment #6) > Attaching a patch that fixes the problem (tested on the USE=tinfo, has > tinfow case). I don't have much experience with this build system so it may > be not up to standards, I don't know. Thanks, I reproduced the problem, and tested your patch fixes the problem with app-admin/testdisk-7.1_pre20180322-r1
would be good to push this patch to the upstream as well: https://github.com/cgsecurity/testdisk/issues/46
Upstream has accepted the patch Please bump testdisk
https://github.com/pentoo/pentoo-overlay/tree/master/app-admin/testdisk I have tested it, the bug is fixed. Please bump asap.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=661fb2d44de4f77afc239eb9761030958c2690cc commit 661fb2d44de4f77afc239eb9761030958c2690cc Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2018-10-05 17:56:39 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2018-10-05 18:01:00 +0000 app-admin/testdisk: Bump to 7.1_pre20180922 snapshot Bug: https://bugs.gentoo.org/654866 Signed-off-by: Michał Górny <mgorny@gentoo.org> app-admin/testdisk/Manifest | 1 + app-admin/testdisk/testdisk-7.1_pre20180922.ebuild | 99 ++++++++++++++++++++++ 2 files changed, 100 insertions(+)
Please test the new snapshot. I'd like to stabilize it in a few days.
app-admin/testdisk-7.1_pre20180922 fixes the bug too. (Thanks to all engaged!)
Arch teams, please stabilize.
x86 stable
amd64 stable