mirror of
https://https.git.savannah.gnu.org/git/patch.git
synced 2026-01-27 01:44:34 +00:00
Some of this merely pacifies -fsanitize=address by pointing to storage rather than freeing it when we are about to exit anyway. Other parts of it keep track of storage more carefully so that it can be freed rather than leak. * src/common.h (struct outfile): New member ‘alloc’. * src/patch.c (files_to_output_root) [SANITIZE_ADDRESS]: New externally visible variable, to pacify -fsanitize=address. (main): Use new functions described below to remove files and free memory. (delete_files): Do not free the list as we go, as we are about to exit and -fsanitize=address doesn’t care about this storage. (output_file_later): Set and use new member ‘alloc’ to avoid memory leaks. (output_files): WIth -fsanitize=address, record the list head in files_to_output_root that the address sanitizer can see, so that it won’t complain when we don’t free storage just before exit. Free only when not exiting, and free using ‘alloc’ rather than ‘name’. (perfile_cleanup_remove): New function. (cleanup_remove): Rename from ‘cleanup’. All uses changed. Reimplement in terms of perfile_cleanup_remove. (free_outfile_name, perfile_cleanup_free): New functions. * src/util.c (make_tempfile): Set new member ‘alloc’.
This is GNU patch, which applies diff files to original files. This version of patch has many changes made by the Free Software Foundation. They add support for: * handling arbitrary binary data and large files * the unified context diff format that GNU diff can produce * merging into files instead of creating reject files * making GNU Emacs-style backup files * improved interaction with RCS and SCCS * the GNU conventions for option parsing and configuring and compilation. * better POSIX compliance They also fix some bugs. If you obtained this file as part of a "git clone", then see the README-hacking file. If this file came to you as part of a tar archive, then see the file INSTALL for compilation and installation instructions. See the file NEWS for a list of major changes in the current release. A more detailed description of all changes can be found in the file ChangeLog in tar archives, and with "git log" which shows the version control history. Tutorial-style documentation for patch is included in the GNU Diffutils package; get GNU Diffutils 2.8 or later for up-to-date documentation for patch. Use `configure --disable-largefile' to disable large file support; this is reportedly necessary on Red Hat GNU/Linux 6.0 to avoid a C library bug. For MS-DOS using DJGPP tools, see the file pc/djgpp/README. For other systems, copy config.hin to config.h and change #undef statements in it to #define as appropriate for your system, and copy Makefile.in to Makefile and set the variables that are enclosed in @ signs as appropriate for your system. Please send bug reports for this version of patch to <bug-patch@gnu.org>. The Free Software Foundation is distributing this version of patch independently because as of this writing, Larry Wall has not released a new version of patch since mid-1988. We have heard that he has been too busy working on other things, like Perl. He has graciously agreed to let GNU `patch' be distributed under the terms of the GNU General Public License. For any copyright year range specified as YYYY-ZZZZ in this package note that the range specifies every single year in that closed interval. Please see the file COPYING for copying conditions. ------ Copyright 1989-2024 Free Software Foundation, Inc. Copyright 1984-1988 Larry Wall This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Description
Languages
C
66.8%
Shell
18.5%
Roff
9.8%
M4
2.1%
Makefile
1.9%
Other
0.9%