1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00
emacs/lib-src
Paul Eggert 25ec995c06 Memory-management cleanup in make-docfile
I compiled it with -fsanitize=address and fixed the leaks it detected.
Also, I changed it to prefer signed to unsigned integer types,
and to check for integer overflow.
* lib-src/make-docfile.c:
Include <stddef.h>, <stdint.h>, <intprops.h>, <min-max.h>.
(memory_exhausted): New function.
(xmalloc, xrealloc): Use it.
(xmalloc, xrealloc, scan_file, struct rcsoc_state, write_c_args)
(uncompiled, scan_lisp_file):
Prefer signed integer types to unsigned.
(xstrdup): Remove.  All uses removed.
(num_globals, num_globals_allocated, write_globals, scan_c_stream):
Use ptrdiff_t, not int, for indexes that in theory could exceed INT_MAX.
(add_global): Use const to pacify --enable-gcc-warnings.
Make a copy here, rather than relying on strdup calls later.
(add_global, write_globals, scan_c_stream):
Avoid integer overflow when calculating sizes.
(write_globals, scan_c_stream, scan_lisp_file): Avoid memory leak.
(scan_c_stream): Check for add_global failure.
2016-02-10 11:41:10 -08:00
..
ChangeLog.1 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
COPYING Change to GPLv3. 2007-07-25 07:00:38 +00:00
ctags.c Port ctags+etags build to Sun C 5.12. 2014-05-18 11:57:04 -07:00
ebrowse.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
emacsclient.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
etags.c Extend etags Ruby support for accessors 2016-02-06 11:08:20 +02:00
hexl.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
make-docfile.c Memory-management cleanup in make-docfile 2016-02-10 11:41:10 -08:00
Makefile.in Update copyright year to 2016 2016-01-01 01:34:24 -08:00
movemail.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
ntlib.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
ntlib.h Update copyright year to 2016 2016-01-01 01:34:24 -08:00
pop.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
pop.h Update copyright year to 2016 2016-01-01 01:34:24 -08:00
profile.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
rcs2log Port "$@" to OpenIndiana ksh93 2016-01-24 17:29:01 -08:00
README changed Emacs' to GNU Emacs' 2006-03-31 07:25:44 +00:00
update-game-score.c Update copyright year to 2016 2016-01-01 01:34:24 -08:00
update-game-score.exe.manifest Provide a Windows manifest for update-game-score.exe. 2013-08-10 10:43:41 +03:00

This directory contains the source code for the architecture-dependent
files that go in ${archlibdir}.  At present, these are mostly utility
programs used by GNU Emacs.