Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914724 - app-misc/mc-4.8.30 diff viewer segfault (with upstream patch)
Summary: app-misc/mc-4.8.30 diff viewer segfault (with upstream patch)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-09-26 02:00 UTC by Duncan
Modified: 2023-09-28 08:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Bare code patch (mc-4.8.30-diffviewer.segfault.patch,993 bytes, patch)
2023-09-26 02:31 UTC, Duncan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2023-09-26 02:00:57 UTC
So mcdiff (mc 4.8.30) has been segfaulting on me.  Today it was annoying enough I looked upstream to see if there was a new version yet that hadn't hit the gentoo tree yet, and/or if a fix was otherwise available.

Seems it's only if line numbers are enabled (which they are here), and the to-be 4.8.31 has a fix committed.  Ticket and commit links:

https://midnight-commander.org/ticket/4500

https://github.com/MidnightCommander/mc/commit/2cff2cfcc530474fd61ba1019cefaa411686de10

But github isn't making it particularly obvious how to actually get the patchfile.  Maybe one has to have an account with them to do that now?

Anyway, maybe a 4.8.30-r1 with this patch (unless 4.8.31 is out by the time this is processed of course).

(I'll try to do the edit manually and upload the resulting bare code patch, should anyone need it before this gets fixed in gentoo.)
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-26 02:02:07 UTC
(In reply to Duncan from comment #0)
> So mcdiff (mc 4.8.30) has been segfaulting on me.  Today it was annoying
> enough I looked upstream to see if there was a new version yet that hadn't
> hit the gentoo tree yet, and/or if a fix was otherwise available.
> 
> Seems it's only if line numbers are enabled (which they are here), and the
> to-be 4.8.31 has a fix committed.  Ticket and commit links:
> 

Thanks!

> https://midnight-commander.org/ticket/4500
> 
> https://github.com/MidnightCommander/mc/commit/
> 2cff2cfcc530474fd61ba1019cefaa411686de10

Append .patch to the URL.
Comment 2 Duncan 2023-09-26 02:31:37 UTC
Created attachment 871467 [details, diff]
Bare code patch

Here's the manually edited bare code patch.  It applies fine, builds, and I tested that it eliminates the segfault, but without comments it's not really suitable for the gentoo tree as-is.
Comment 3 Duncan 2023-09-26 02:37:28 UTC
(In reply to Sam James from comment #1)
> Append .patch to the URL.

Thanks!  (Back atcha! =:^)
Comment 4 Larry the Git Cow gentoo-dev 2023-09-28 08:25:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e09b30342bb353a0c6603325c27a79332c9e66f

commit 6e09b30342bb353a0c6603325c27a79332c9e66f
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-09-28 08:21:30 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-09-28 08:25:01 +0000

    app-misc/mc: backport upstream fix for mcdiff segfaults
    
    Closes: https://bugs.gentoo.org/914724
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 app-misc/mc/files/mc-4.8.30-mcdiff-segfault.patch  | 36 ++++++++++++++++++++++
 .../mc/{mc-4.8.30.ebuild => mc-4.8.30-r1.ebuild}   |  1 +
 2 files changed, 37 insertions(+)