Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664640 - sys-devel/patch: git-style patch on nonexistent file causes stack overflow
Summary: sys-devel/patch: git-style patch on nonexistent file causes stack overflow
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/bugs/?54558
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-26 11:48 UTC by Michał Górny
Modified: 2018-08-26 17:27 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-26 11:48:09 UTC
E.g. when failing at tab completion:

$ git diff syncplay-9999.ebuild | patch syncplay-1.5.
patching file syncplay-1.5.
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file syncplay-1.5..rej
patch: **** Can't reopen file syncplay-1.5. : No such file or directory
[repeated ~1024 times]
patch: **** Can't reopen file syncplay-1.5. : Too many open files
patch: **** Can't create file syncplay-1.5..orig : Too many open files
[again, repeated a lot]
patch: **** Can't create file syncplay-1.5..origSegmentation fault (core dumped)
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2018-08-26 13:51:01 UTC
Why do you think this is caused by diffutils? I see only "patch" going crazy.
Comment 2 Larry the Git Cow gentoo-dev 2018-08-26 14:32:36 UTC
The bug has been closed via the following commit(s):

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

commit dedeef3e8b0b5cb7010149efa4e92892fa74ed36
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-08-26 14:32:18 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-08-26 14:32:18 +0000

    sys-devel/patch: fix error handling with git-style patches
    
    Closes: https://bugs.gentoo.org/664640
    Package-Manager: Portage-2.3.48, Repoman-2.3.10

 ...fix-error-handling-with-git-style-patches.patch | 125 +++++++++++++++++++++
 sys-devel/patch/patch-2.7.6-r2.ebuild              |  36 ++++++
 2 files changed, 161 insertions(+)
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2018-08-26 14:34:01 UTC
Given that this is "patch", we will let it sit in ~arch a few days. But then we'll just move stable keywords.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-08-26 17:27:26 UTC
I'm sorry about the wrong package.  I recalled it was separate from diffutils but I wrongly assumed that would be patchutils, noticed I didn't have that and returned to blame diffutils ;-).