Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654866 - app-admin/testdisk-7.1_pre20180922: stablereq (was: with sys-libs/ncurses-6.1-r2 - segmentation fault in termattrs_sp () from /lib64/libncursesw.so.6)
Summary: app-admin/testdisk-7.1_pre20180922: stablereq (was: with sys-libs/ncurses-6.1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: ncurses-6.1
  Show dependency tree
 
Reported: 2018-05-04 20:01 UTC by Sławomir Nizio
Modified: 2018-10-20 17:52 UTC (History)
5 users (show)

See Also:
Package list:
app-admin/testdisk-7.1_pre20180922
Runtime testing required: ---
stable-bot: sanity-check+


Attachments
fix (testdisk-7.1_pre20180322-tinfow.patch,1.65 KB, patch)
2018-06-25 20:52 UTC, Sławomir Nizio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sławomir Nizio 2018-05-04 20:01:54 UTC
(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
Comment 1 Sławomir Nizio 2018-05-04 20:13:04 UTC
also:
bug 654870 about cfdisk from sys-apps/util-linux-2.30.2-r1
Comment 2 Sławomir Nizio 2018-05-04 20:16:43 UTC
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]
Comment 3 egon 2018-05-05 09:30:12 UTC
same problem here, but using 
sys-libs/ncurses -tinfo in package useflags segfault is gone
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2018-05-07 05:05:17 UTC
What (virtual) terminal are you using?
Comment 5 egon 2018-05-07 21:01:47 UTC
i'm using xterm-256color.
Comment 6 Sławomir Nizio 2018-06-25 20:50:47 UTC
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.
Comment 7 Sławomir Nizio 2018-06-25 20:52:34 UTC
Created attachment 537260 [details, diff]
fix
Comment 8 Mark Wright gentoo-dev 2018-08-13 11:04:58 UTC
(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
Comment 9 Anton Bolshakov 2018-09-22 04:32:26 UTC
would be good to push this patch to the upstream as well:
https://github.com/cgsecurity/testdisk/issues/46
Comment 10 Anton Bolshakov 2018-09-23 02:25:49 UTC
Upstream has accepted the patch
 Please bump testdisk
Comment 11 Anton Bolshakov 2018-09-27 03:24:41 UTC
https://github.com/pentoo/pentoo-overlay/tree/master/app-admin/testdisk
I have tested it, the bug is fixed.

Please bump asap.
Comment 12 Larry the Git Cow gentoo-dev 2018-10-05 18:15:13 UTC
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(+)
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-10-05 18:16:59 UTC
Please test the new snapshot.  I'd like to stabilize it in a few days.
Comment 14 Sławomir Nizio 2018-10-08 17:25:04 UTC
app-admin/testdisk-7.1_pre20180922 fixes the bug too. (Thanks to all engaged!)
Comment 15 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-10-19 09:45:53 UTC
Arch teams, please stabilize.
Comment 16 Thomas Deutschmann (RETIRED) gentoo-dev 2018-10-19 17:54:45 UTC
x86 stable
Comment 17 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-10-20 17:52:57 UTC
amd64 stable