bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-patch] patch 2.7.6: Segmentation Fault trying to patch a non existi


From: Mirko Banchi
Subject: [bug-patch] patch 2.7.6: Segmentation Fault trying to patch a non existing file
Date: Tue, 23 Jul 2019 12:00:25 +0200

Distro: Ubuntu 18.04

$ patch --version:

GNU patch 2.7.6
Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc.
Copyright (C) 1988 Larry Wall

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Larry Wall and Paul Eggert
----------------------

The problem happens when i try to patch a file that doesn't exist. Which patch is used doesn't matter:

$ ls .
my-patch.patch
$ patch foo < my-patch.patch 2> err
patching file foo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 7.
Hunk #3 FAILED at 36.
Hunk #4 FAILED at 205.
Hunk #5 FAILED at 240.
5 out of 5 hunks FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 78.
2 out of 2 hunks FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 26.
Hunk #2 FAILED at 91.
2 out of 2 hunks FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 345.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 91.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 88.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 93.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 23.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 22.
1 out of 1 hunk FAILED -- saving rejects to file foo.rej
patching file foo
Hunk #1 FAILED at 368.
Hunk #2 FAILED at 385.
Hunk #3 FAILED at 546.
3 out of 3 hunks FAILED -- saving rejects to file foo.rej
Segmentation fault (core dumped)

$ cat err
patch: **** Can't reopen file foo : No such file or directory
patch: **** Can't reopen file foo : No such file or directory
patch: **** Can't reopen file foo : No such file or directory
patch: **** Can't reopen file foo : No such file or directory
[...]
patch: **** Can't reopen file foo : Too many open files
patch: **** Can't create file foo.orig : Too many open files
patch: **** Can't create file foo.orig : Too many open files
patch: **** Can't create file foo.orig : Too many open files
patch: **** Can't create file foo.orig : Too many open files
[...]

Mirko

reply via email to

[Prev in Thread] Current Thread [Next in Thread]