Nelson Ferreira [Sat, 3 Mar 2012 04:07:47 +0000 (23:07 -0500)]
Better checking of string and memory operations.
Also, add define FORBID_STRCPY to make runtime asserts on usage of strcpy, strcat and stpcpy.
* src/sysdep.h: Move xstrlen, xstrcmp, xstrcat, xstrncmp,
xstrncat, xstrncpy, xstpcpy, xstpncpy, xmemcmp, xmemcpy to
sxe-utils.h
* src/sysdep.h (x__dirlen): always_inline..
* src/sysdep.h (x__dirname): ditto.
* src/sysdep.h (xdirname): ditto.
* src/sxe-utils.h (xstrlen): move from sysdep.h
* src/sxe-utils.h (xstrcmp): ditto.
* src/sxe-utils.h (xstrncmp): ditto.
* src/sxe-utils.h (xstrncat): ditto.
* src/sxe-utils.h (xstrncpy): ditto.
* src/sxe-utils.h (xstpcpy): ditto.
* src/sxe-utils.h (xstpncpy): ditto.
* src/sxe-utils.h (xmemcmp): ditto.
* src/sxe-utils.h (xmemcpy): ditto.
* src/sxe-utils.h (xmin_size_t): ditto.
* src/sxe-utils.h (no_strcpy): New forbidden strcpy
* src/sxe-utils.h (no_strcat): New forbidden strcat
* src/sxe-utils.h (no_stpcpy): New forbidden stpcpy
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 2 Mar 2012 22:56:47 +0000 (17:56 -0500)]
xstrncpy saga
* src/dumper.c (pdump_load): Use xstrncpy instead of strncpy
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 2 Mar 2012 22:29:57 +0000 (17:29 -0500)]
xstrncpy saga
* src/sysdep.h (xstrncpy): New inline function.
* src/sysdep.h (xstpncpy): Use xstrncpy instead of strncpy
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 2 Mar 2012 21:20:19 +0000 (16:20 -0500)]
xstrncpy saga
* lib-src/fakemail.c (make_file_preface): Use xstrncpy instead of strncpy
* lib-src/fakemail.c (read_header): ditto.
* lib-src/fakemail.c (main): ditto.
* lib-src/gnuclient.c (main): ditto.
* lib-src/gnuserv.c (handle_ipc_request): ditto.
* lib-src/movemail.c (concat): ditto.
* lib-src/movemail.c (pop_retr): ditto.
* lib-src/movemail.c (pop_retr): ditto.
* lib-src/movemail.c (pop_search_top): ditto.
* lib-src/movemail.c (pop_search_top): ditto.
* lib-src/ootags.c (consider_token): ditto.
* lib-src/ootags.c (C_entries): ditto.
* lib-src/ootags.c (Pascal_functions): ditto.
* lib-src/ootags.c (Prolog_functions): ditto.
* lib-src/ootags.c (Erlang_functions): ditto.
* lib-src/ootags.c (substitute): ditto.
* lib-src/ootags.c (savenstr): ditto.
* lib-src/pop.c (pop_stat): ditto.
* lib-src/pop.c (pop_list): ditto.
* lib-src/pop.c (pop_multi_first): ditto.
* lib-src/pop.c (pop_last): ditto.
* lib-src/pop.c (getok): ditto.
* lib-src/yow.c (main): ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 2 Mar 2012 21:12:41 +0000 (16:12 -0500)]
xstrncpy saga
* lib-src/etags.c (xstrncpy): cosmetic changes to xstrncpy macro
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 21:11:08 +0000 (16:11 -0500)]
Coverity: Resource leak: CID 400020
* src/editfns.c (Ftemp_directory): Check against 0 too. Unlikely
but possible.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 21:07:06 +0000 (16:07 -0500)]
Coverity: Resource leak: CID 400022
* src/emacs.c (main_1): Make sure the temporary descriptor is 0,
which makes the "leak" intentional.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 20:19:03 +0000 (15:19 -0500)]
Coverity: Resource leak: CID 400023
* src/fileio.c (Fcopy_file): make sure ifd is closed
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 20:15:00 +0000 (15:15 -0500)]
Coverity: Resource leak: 400024
* src/fileio.c (Fdo_auto_save): Make sure file is closed
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 19:57:22 +0000 (14:57 -0500)]
Coverity: Stray pointer arithmetic: CID 400000
* src/callint.c (Fcall_interactively): add new fcall array, which
is the one allocated, and make args value derive from that. Fill
in function in fcall, and arguments in args.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 19:53:52 +0000 (14:53 -0500)]
Coverity: Division by zero: CID 400004
* src/media/media.c (Fmedia_stream_aspect): assert for den != 0,
with additional check for the "already crashing" scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 19:52:07 +0000 (14:52 -0500)]
Coverity: Resource leak: CID 400025
* src/ui/X11/glyphs-x.c (x_init_image_instance_from_eimage): Free
pixtbl if we are not using it...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 19:49:01 +0000 (14:49 -0500)]
Coverity: Resource Leak: CID 400026
* src/ui/redisplay.c (add_glyph_rune): Dynarr_free not used
allocated memory.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 18:29:13 +0000 (13:29 -0500)]
Don't use strncpy, instead use *dest='\0' followed by strncat (with len-1)
* lib-src/etags.c (write_classname): use xstrncpy instead of strncpy
* lib-src/etags.c (consider_token): ditto.
* lib-src/etags.c (C_entries): ditto.
* lib-src/etags.c (Pascal_functions): ditto.
* lib-src/etags.c (HTML_lables): ditto.
* lib-src/etags.c (Prolog_functions): ditto.
* lib-src/etags.c (Erlang_functions): ditto.
* lib-src/etags.c (substitute): ditto.
* lib-src/etags.c (readline_internal): ditto.
* lib-src/etags.c (savenstr): ditto.
* lib-src/etags.c (concat): ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 29 Feb 2012 15:56:01 +0000 (10:56 -0500)]
Coverity: CID 21065: Missing break
* src/regex.c (common_op_match_null_string_p): Insert missing
brake for set_number_at case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Mon, 27 Feb 2012 04:32:30 +0000 (23:32 -0500)]
Coverity: DEADCODE: CID 583
* src/media/media-internal.c (int2ulaw): Do the assignment outside
of if condition to avoid Coverity false positive and improve code
legibility.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Sat, 25 Feb 2012 06:19:43 +0000 (16:19 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: Overrun static CID: 138
Coverity: CID 681: TAINTED STRING
Coverity: CID 610-DEAD CODE 611-UNUSED VALUE
Coverity: TOCTOU: CID 387
Coverity:Tainted string: CID 384
Coverity: Tainted string: CID 386
Nelson Ferreira [Fri, 24 Feb 2012 21:28:20 +0000 (16:28 -0500)]
Coverity: Overrun static CID: 138
* src/dumper.c (pdump_register_struct): Be even more obvious that
control flow ends on abort, which could fall through in the case
of fatal error.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 24 Feb 2012 21:26:52 +0000 (16:26 -0500)]
Coverity: CID 681: TAINTED STRING
* src/emacs.c (main): Be even more strict on checks...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 24 Feb 2012 21:10:44 +0000 (16:10 -0500)]
Coverity: CID 610-DEAD CODE 611-UNUSED VALUE
* lib-src/etags.c (process_file_name): compr was not being used
before anyway so just remove the assignment from the if statement.
* lib-src/etags.c (process_file_name): only make compressed_value
NULL if it was previously not null. But still free it. This means
that after the free we CANNOT dereference it.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 24 Feb 2012 17:51:35 +0000 (12:51 -0500)]
Coverity: TOCTOU: CID 387
* lib-src/etags.c (process_file_name): use open/popen then handle
failure, instead of stat. Also, after successful open check it is
regular file, and reject it is not.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 24 Feb 2012 17:47:30 +0000 (12:47 -0500)]
Coverity:Tainted string: CID 384
* lib-src/movemail.c (main): Sanitize argv[optind] so one can mark as fixed
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 24 Feb 2012 15:36:55 +0000 (10:36 -0500)]
Coverity: Tainted string: CID 386
* src/emacs.c (main): Do sanity checking on the arguments
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 23 Feb 2012 06:58:37 +0000 (16:58 +1000)]
Really fix FreeBSD -fstack-protector builds
* freebsd-ssp:
Fix building on FreeBSD with -fstack-protector.
Steve Youngs [Thu, 23 Feb 2012 06:57:06 +0000 (16:57 +1000)]
Fix building on FreeBSD with -fstack-protector.
So, as it turns out, FreeBSD CAN build SXEmacs with -fstack-protector.
But only if you DON'T link with libssp. Who knew?
* m4/sxe-compiler.m4 (SXE_STACK_FLAGS): Re-work so that on FreeBSD
libssp is NOT used, while it is everywhere else.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Thu, 23 Feb 2012 00:06:52 +0000 (10:06 +1000)]
Coverity fixes, etc from Nelson
* merges:
Coverity: TOCTOU: CID 392
Fix build...
Coverity: TOCTOU: CID 391
Coverity: TOCTOU: CID 390
Coverity: TOCTOU: CID 387
Better stack-protector behavior in FreeBSD
Remove forceful disable of ase in Mac OS X
Coverity CID 52: Forward null
Slightly better basic type detection.
Nelson Ferreira [Wed, 22 Feb 2012 23:38:13 +0000 (18:38 -0500)]
Coverity: TOCTOU: CID 392
* src/editfns.c (Ftemp_directory): First mkdir then properly
handle errors for the home directory temp directory creation.
Also attempt to create .created_by_sxemacs in case the dir exists.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 23:36:01 +0000 (18:36 -0500)]
Fix build...
* src/ui/X11/xgccache.c (gc_cache_lookup): NULL not null
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 23:33:17 +0000 (18:33 -0500)]
Coverity: TOCTOU: CID 391
* lib-src/ootags.c (process_file): Check for regular file after
open, even if it fails, to improve diagnostic message.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 23:29:43 +0000 (18:29 -0500)]
Coverity: TOCTOU: CID 390
* lib-src/movemail.c (main): No need to check access to outname,
since open will fail and we are not giving any better diagnosis.
* lib-src/movemail.c (main): Ditto for inname.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 23:23:46 +0000 (18:23 -0500)]
Coverity: TOCTOU: CID 387
* lib-src/make-path.c (touchy_mkdir): Try to avoid check/create
race condition by first attempting to create, then check any
error. If it is EEXISTS or directory already exists, then all
good.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 22:49:47 +0000 (17:49 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 22 Feb 2012 22:49:38 +0000 (17:49 -0500)]
Better stack-protector behavior in FreeBSD
* m4/sxe-compiler.m4 (SXE_STACK_FLAGS): Forcefully disable stack-protector on freebsd and output warning message..
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 22:48:22 +0000 (17:48 -0500)]
Remove forceful disable of ase in Mac OS X
* configure.ac: Remove conditional on opsys != darwin for ase
inclusion. Make conditional on ase components depend on having
dynamic or static ase, not on OS...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 22 Feb 2012 21:52:45 +0000 (16:52 -0500)]
Merge remote-tracking branch 'origin/master' into for-steve
Steve Youngs [Wed, 22 Feb 2012 03:49:44 +0000 (13:49 +1000)]
aRts removal from Horst
* merges:
[aRts removal] Exorcizo te, omnis spiritus immunde, in nomine Dei Patris omnipotentis
ex{|or}cise the monstrosity that is aRts once and for all
Horst G. Burkhardt III [Wed, 22 Feb 2012 02:55:21 +0000 (13:55 +1100)]
[aRts removal] Exorcizo te, omnis spiritus immunde, in nomine Dei Patris omnipotentis
Signed-off-by: Horst G. Burkhardt III <horst@sxemacs.org>
Horst G. Burkhardt III [Wed, 22 Feb 2012 01:09:40 +0000 (12:09 +1100)]
ex{|or}cise the monstrosity that is aRts once and for all
Signed-off-by: Horst G. Burkhardt III <horst@sxemacs.org>
Steve Youngs [Sat, 18 Feb 2012 15:01:25 +0000 (01:01 +1000)]
PROBLEMS update re SSP on FreeBSD from Horst
* merges:
added warning against SSP on FreeBSD to PROBLEMS file
Horst G. Burkhardt III [Sat, 18 Feb 2012 00:48:24 +0000 (11:48 +1100)]
added warning against SSP on FreeBSD to PROBLEMS file
Signed-off-by: Horst G. Burkhardt III <horst@sxemacs.org>
Nelson Ferreira [Sat, 11 Feb 2012 02:07:57 +0000 (21:07 -0500)]
Coverity CID 52: Forward null
* src/ui/X11/xgccache.c (gc_cache_lookup): Only dereference
cell/cache->head if not NULL
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 1 Feb 2012 16:15:57 +0000 (11:15 -0500)]
Merge remote-tracking branch 'origin/master' into for-steve
Steve Youngs [Tue, 31 Jan 2012 02:34:08 +0000 (12:34 +1000)]
Merge branch 'openindie'
* openindie:
Fix build on OpenIndiana
Steve Youngs [Tue, 31 Jan 2012 02:31:43 +0000 (12:31 +1000)]
Fix build on OpenIndiana
"Fix" is probably too strong a word here, it wasn't really broken in the
first place. Just a tiny tweak to autogen.sh was the only "fix" needed
here.
This changeset also documents (in PROBLEMS) the missing deps needed to
build SXEmacs on OpenIndiana.
* autogen.sh: Only add the xpg4/bin directory to the $PATH if this
isn't OpenIndiana.
* PROBLEMS: Document build quirks for OpenIndiana.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 08:01:03 +0000 (18:01 +1000)]
The Great Whitespace Cleanup
* whitespace: (24 commits)
Whitespace cleanup in src [m-z]
Whitespace cleanup in src [f-l]
Whitespace cleanup in src [a-e]
Whitespace cleanup in src/database
Whitespace cleanup in src/ent
Whitespace cleanup in src/events
Whitespace cleanup in src/m
Whitespace cleanup in src/media
Whitespace cleanup in src/mem
Whitespace cleanup in src/mule
Whitespace cleanup in src/s
Whitespace cleanup in src/ui
Whitespace cleanup in src/ui/lwlib
Whitespace cleanup in src/ui/X11
Whitespace cleanup in src/ui/TTY
Whitespace cleanup in tests
Whitespace cleanup in modules
Whitespace cleanup in m4
Whitespace cleanup in lisp
Whitespace cleanup in lib-src
...
Steve Youngs [Sat, 28 Jan 2012 07:41:50 +0000 (17:41 +1000)]
Whitespace cleanup in src [m-z]
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 07:27:57 +0000 (17:27 +1000)]
Whitespace cleanup in src [f-l]
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 07:22:02 +0000 (17:22 +1000)]
Whitespace cleanup in src [a-e]
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 07:08:21 +0000 (17:08 +1000)]
Whitespace cleanup in src/database
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 07:06:29 +0000 (17:06 +1000)]
Whitespace cleanup in src/ent
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:59:05 +0000 (16:59 +1000)]
Whitespace cleanup in src/events
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:54:49 +0000 (16:54 +1000)]
Whitespace cleanup in src/m
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:47:35 +0000 (16:47 +1000)]
Whitespace cleanup in src/media
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:41:08 +0000 (16:41 +1000)]
Whitespace cleanup in src/mem
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:39:24 +0000 (16:39 +1000)]
Whitespace cleanup in src/mule
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:36:00 +0000 (16:36 +1000)]
Whitespace cleanup in src/s
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:20:04 +0000 (16:20 +1000)]
Whitespace cleanup in src/ui
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:06:36 +0000 (16:06 +1000)]
Whitespace cleanup in src/ui/lwlib
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 06:01:24 +0000 (16:01 +1000)]
Whitespace cleanup in src/ui/X11
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 05:45:45 +0000 (15:45 +1000)]
Whitespace cleanup in src/ui/TTY
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 04:35:02 +0000 (14:35 +1000)]
Whitespace cleanup in tests
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 04:28:25 +0000 (14:28 +1000)]
Whitespace cleanup in modules
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 04:20:31 +0000 (14:20 +1000)]
Whitespace cleanup in m4
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 04:16:00 +0000 (14:16 +1000)]
Whitespace cleanup in lisp
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 03:00:23 +0000 (13:00 +1000)]
Whitespace cleanup in lib-src
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 02:52:19 +0000 (12:52 +1000)]
Whitespace cleanup in info
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 02:17:00 +0000 (12:17 +1000)]
Whitespace cleanup in etc
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 02:12:08 +0000 (12:12 +1000)]
Whitespace cleanup in contrib
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 02:08:52 +0000 (12:08 +1000)]
Whitespace cleanup in toplevel dir
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Sat, 28 Jan 2012 00:15:37 +0000 (10:15 +1000)]
Merge branch 'merges'
* merges:
Conditional definition of HAVE_ALLOCA to avoid meaningless HAVE_ALLOCA redefined warnings...
Use the real pre-processor var: DEBUG_SXEMACS
Coverity: Forward NULL: CID 607
Nelson Ferreira [Sat, 28 Jan 2012 00:03:34 +0000 (19:03 -0500)]
Slightly better basic type detection.
* m4/sxe-libc.m4 (SXE_CHECK_BASIC_TYPES): Check for int64_t, intptr_t and sizeof float
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 27 Jan 2012 22:57:17 +0000 (17:57 -0500)]
Conditional definition of HAVE_ALLOCA to avoid meaningless HAVE_ALLOCA redefined warnings...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 27 Jan 2012 22:47:11 +0000 (17:47 -0500)]
Merge branch 'for-steve' into njsf-cov
Steve Youngs [Wed, 25 Jan 2012 05:41:59 +0000 (15:41 +1000)]
autogen.sh fix from Nelson
* merges:
Use head -n1 throughout
Do not confuse GIT with git (or vice-versa)
Steve Youngs [Wed, 25 Jan 2012 05:40:11 +0000 (15:40 +1000)]
Use head -n1 throughout
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Nelson Ferreira [Wed, 25 Jan 2012 04:45:59 +0000 (23:45 -0500)]
Do not confuse GIT with git (or vice-versa)
* autogen.sh: Make sure to only conside one line of git describe,
thus taking care of GIT (http://www.gnu.org/software/git/) being
installed instead of git (http://git-scm.com)
* configure.ac: ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Wed, 25 Jan 2012 00:21:36 +0000 (10:21 +1000)]
Merge branch 'breathing'
* breathing:
Be consistent with setting and testing for breathing_space
Steve Youngs [Wed, 25 Jan 2012 00:19:53 +0000 (10:19 +1000)]
Be consistent with setting and testing for breathing_space
* src/alloc.c (refill_memory_reserve): Test if breathing_space is
NULL, not zero.
Don't cast the malloc.
* src/alloc.c (garbage_collect_1): Increase breathing_space to,
erm, give us more breathing space.
* src/alloc.c (reinit_alloc_once_early): Set breathing_space to
NULL, not zero.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Wed, 25 Jan 2012 00:02:25 +0000 (10:02 +1000)]
Build fix from Sebastian
* merges:
Summary: fix, make sure ssp actually works before using it Keywords: bldchn diagnostics
Sebastian Freundt [Tue, 24 Jan 2012 23:45:50 +0000 (23:45 +0000)]
Merge branch 'bldchn/diag' into next
* bldchn/diag:
Summary: fix, make sure ssp actually works before using it Keywords: bldchn diagnostics
Sebastian Freundt [Tue, 24 Jan 2012 23:45:43 +0000 (23:45 +0000)]
Summary: fix, make sure ssp actually works before using it
Keywords: bldchn diagnostics
This changeset hopefully resolves the issue Nelson had with ssp and
-fstack-protector. Using crystal ball technology and rune readings
it turns out that gcc single-handedly adds -lssp as soon as
-fstack-protector is specified, regardless if it works or exists.
* m4/sxe-compiler.m4 (SXE_STACK_FLAGS): check if ssp works before adding
-fstack-protector
Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Steve Youngs [Tue, 24 Jan 2012 12:20:47 +0000 (22:20 +1000)]
Build fix from Rudi
* merges:
build fix, undeclared XmCR_UNKNOWN
Ruediger Meier [Tue, 24 Jan 2012 11:19:57 +0000 (12:19 +0100)]
build fix, undeclared XmCR_UNKNOWN
This got accidentally broken in
613c762f.
Steve Youngs [Tue, 24 Jan 2012 02:33:31 +0000 (12:33 +1000)]
Changes from Nelson
* merges:
Add a bit more breathing space to alloc
Cosmetic break
Empty merge
compre on by default, no longer experimental
Nelson Ferreira [Mon, 23 Jan 2012 23:53:36 +0000 (18:53 -0500)]
Add a bit more breathing space to alloc
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Mon, 23 Jan 2012 22:22:26 +0000 (08:22 +1000)]
Build chain tweaks from Sebastian
* merges:
Summary: minor, provide malldbg multiarg for MALLOC_PERTURB_ Keywords: bldchn diagnostics
Summary: minor, add stack to --with-error-checking to turn SSP on Keywords: bldchn diagnostics
Sebastian Freundt [Mon, 23 Jan 2012 21:45:37 +0000 (21:45 +0000)]
Merge branch 'bldchn/diag' into next
* bldchn/diag:
Summary: minor, provide malldbg multiarg for MALLOC_PERTURB_ Keywords: bldchn diagnostics
Summary: minor, add stack to --with-error-checking to turn SSP on Keywords: bldchn diagnostics
Sebastian Freundt [Mon, 23 Jan 2012 21:45:10 +0000 (21:45 +0000)]
Summary: minor, provide malldbg multiarg for MALLOC_PERTURB_
Keywords: bldchn diagnostics
This changeset introduces a multiarg item to the error-checking option
group, named `malldbg', that controls MALLOC_PERTURB_ and friends when
dumping. This should fix the dumping procedure on MALLOC_PERTURB_
systems as our dumper reacts quite sensitively to that kind of system
hardening.
This changeset contains no additional intelligence to turn it off
automatically, if you see crashes during the dump phase conside
--with-error-checking=nomalldbg.
Whether or not we can persuade (read fix) the dumper code to react more
friendly to this kind of interference is subject to a different patch.
* configure.ac: add `malldbg' to the error-checking multiarg
* m4/sxe-compiler.m4: prepare EXTRA_BATCHENV in case malldbg is off
* src/Makefile.am: extend dumping environment to EXTRA_BATCHENV
Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Nelson Ferreira [Mon, 23 Jan 2012 19:03:28 +0000 (14:03 -0500)]
Cosmetic break
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Mon, 23 Jan 2012 19:01:57 +0000 (14:01 -0500)]
Empty merge
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Mon, 23 Jan 2012 18:52:52 +0000 (13:52 -0500)]
compre on by default, no longer experimental
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Mon, 23 Jan 2012 18:52:12 +0000 (13:52 -0500)]
Use the real pre-processor var: DEBUG_SXEMACS
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Mon, 23 Jan 2012 09:28:44 +0000 (04:28 -0500)]
Merge remote-tracking branch 'origin/master' into njsf-cov
Nelson Ferreira [Mon, 23 Jan 2012 09:26:35 +0000 (04:26 -0500)]
Coverity: Forward NULL: CID 607
* lib-src/etags.c (regex_tag_multiline): Really fix Forward NULL.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Sebastian Freundt [Sun, 22 Jan 2012 11:42:14 +0000 (11:42 +0000)]
Summary: minor, add stack to --with-error-checking to turn SSP on
Keywords: bldchn diagnostics
This changeset fixes a potential stack bashing in the mapfam permutation
code by inserting proper break statements where they belong. This could
be one of the reasons of bug #135 and it's yet to be shown that it fixes
anything (other than pleasing coverity).
* configure.ac: add `stack' to the error-checking multiarg
* m4/sxe-compiler.m4: check for -fstack-protector and link with libssp
Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Steve Youngs [Sat, 21 Jan 2012 06:44:57 +0000 (16:44 +1000)]
Fix ase-interval from Nelson
* merges:
Fix crash in _ase_interval_union_boundary. Only fini tmp when ur->next becomes tmp->next
Nelson Ferreira [Sat, 21 Jan 2012 06:22:07 +0000 (01:22 -0500)]
Fix crash in _ase_interval_union_boundary. Only fini tmp when ur->next becomes tmp->next
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Sat, 21 Jan 2012 05:36:53 +0000 (15:36 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: Assert side effect: CID 2
Coverity: Checked return: CID 10
Coverity: Checked return: CID 11
Coverity: Checked return: CID 12
Coverity: Char IO: CID 7
Coverity: No effect: CID 134
Coverity: Overrun static: CID 137, 136
Coverity: Overrun static: CID 139
Coverity: Overrun static: CID 141
Coverity: Resource leak: CID 178
Coverity: Resource leak: CID 180
Coverity: Resource leak: CID 181
Coverity: Resource leak: CID 181
Coverity: Resource leak: CID 183
Coverity: Resource Leak: CID 184
Coverity: Resource Leak: CID 185
Coverity: Forward NULL: CID 605
Coverity: Missing return: CID 606
Nelson Ferreira [Sat, 21 Jan 2012 04:44:33 +0000 (23:44 -0500)]
Coverity: Assert side effect: CID 2
* src/extents.c (gap_array_delete_marker): Remove unnecessary
volatile (we don't multithread so we should have this be
interrupted. If at some point we make multi-threaded SXEmacs, this
should be protected by some barrier.
* src/extents.c (gap_array_delete_all_markers): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:39:47 +0000 (23:39 -0500)]
Coverity: Checked return: CID 10
* lib-src/hexl.c (main): signal intent to ignore read char
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>