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>
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>
Nelson Ferreira [Sat, 21 Jan 2012 04:39:00 +0000 (23:39 -0500)]
Coverity: Checked return: CID 11
* lib-src/make-docfile.c (scan_lisp_file): Signal intent to ignore
read char.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:38:14 +0000 (23:38 -0500)]
Coverity: Checked return: CID 12
* modules/ase/ase-interval.c (_ase_interval_union_item_fini):
Signal intention to ignore the return value of decref.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:36:38 +0000 (23:36 -0500)]
Coverity: Char IO: CID 7
* lib-src/make-docfile.c (read_lisp_symbol): Proper handling of
cast for getc...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:26:55 +0000 (23:26 -0500)]
Coverity: No effect: CID 134
* src/ui/TTY/event-tty.c (emacs_tty_next_event): Change the loop
variable to int to properly map the type of descriptors.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:24:45 +0000 (23:24 -0500)]
Coverity: Overrun static: CID 137, 136
* src/mule/mule-charset.h (CHARSET_BY_ATTRIBUTES): Do paranoid
bounds checking...
* src/mule/mule-charset.h (REP_BYTES_BY_FIRST_BYTE): Make sure to
not dereference in fatal crash scenario where assert flows through...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:18:37 +0000 (23:18 -0500)]
Coverity: Overrun static: CID 139
* src/dumper.c (pdump_register_object): Fix of-by-one boundary and
return after abort for fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:13:10 +0000 (23:13 -0500)]
Coverity: Overrun static: CID 141
* src/ui/imgproc.c (get_histogram): Introduce paranoid histogram
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 04:04:34 +0000 (23:04 -0500)]
Coverity: Resource leak: CID 178
* lib-src/etags.c (regex_tag_multiline): Make it clear a non-null
name was allocated in substitute and always free it :)
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:57:44 +0000 (22:57 -0500)]
Coverity: Resource leak: CID 180
* lib-src/movemail.c (lock_dot): free the memory
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:55:04 +0000 (22:55 -0500)]
Coverity: Resource leak: CID 181
* lib-src/ootags.c (Erlang_functions): free the memory
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:53:29 +0000 (22:53 -0500)]
Coverity: Resource leak: CID 181
* lib-src/ootags.c (Erlang_functions): xfree the memory
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:52:05 +0000 (22:52 -0500)]
Coverity: Resource leak: CID 183
* lib-src/yow.c (yow): Free the memory...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:49:06 +0000 (22:49 -0500)]
Coverity: Resource Leak: CID 184
* modules/ase/ase-interval.c (_ase_interval_union_boundary):
Properly get rid of the interval.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:44:28 +0000 (22:44 -0500)]
Coverity: Resource Leak: CID 185
* modules/ase/ase-interval.c (_ase_subtract_intr_intr): Properly
get rid of the interval.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:15:40 +0000 (22:15 -0500)]
Coverity: Forward NULL: CID 605
* src/ui/X11/event-Xt.c (Xt_timeout_callback): Just return in case
of fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Sat, 21 Jan 2012 03:13:23 +0000 (22:13 -0500)]
Coverity: Missing return: CID 606
* src/ui/window.c (window_display_buffer): Return NULL for the
fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Sat, 21 Jan 2012 02:16:00 +0000 (12:16 +1000)]
configure fix plus mapfam fix from Sebastian
* merges:
Summary: fix, add missing break statements in mapfam permutation code Keywords: fix bug 135
Summary: fix, properly expand OG_MULTIARG_ITEM indirections Keywords: bldchn
Sebastian Freundt [Sat, 21 Jan 2012 00:03:25 +0000 (00:03 +0000)]
Merge branch 'bug/135' into next
* bug/135:
Summary: fix, add missing break statements in mapfam permutation code Keywords: fix bug 135
Sebastian Freundt [Sat, 21 Jan 2012 00:03:13 +0000 (00:03 +0000)]
Summary: fix, add missing break statements in mapfam permutation code
Keywords: fix bug 135
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).
* src/map.c (__perm_nseq): no switch fallthrough, insert breaks
Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Sebastian Freundt [Fri, 20 Jan 2012 23:58:21 +0000 (23:58 +0000)]
Merge branch 'bldchn' into next
* bldchn:
Summary: fix, properly expand OG_MULTIARG_ITEM indirections Keywords: bldchn
Sebastian Freundt [Fri, 20 Jan 2012 23:58:10 +0000 (23:58 +0000)]
Summary: fix, properly expand OG_MULTIARG_ITEM indirections
Keywords: bldchn
This changeset expands the explanations of multiarg items in option
groups properly (again), m4_text_wrap (and AS_HELP_STRING) fail to
evaluate arguments that come from the temporary redefinition of
OG_MULTIARG_ITEM.
* m4/sxe-option-groups.m4: mimic AS_HELP_STRING in temporary expansion
of OG_MULTIARG_ITEM
Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
Steve Youngs [Fri, 20 Jan 2012 23:13:36 +0000 (09:13 +1000)]
Coverity updates/fixes from Nelson
* merges:
Avoid warnings
Coverity: Forward NULL: CID 32
Coverity: Forward NULL: CID 33
Coverity: Forward NULL: CID 34
Coverity: Forward NULL: CID 35
Coverity: Forward NULL: CID 37
Coverity: Forward NULL: CID 38
Coverity: Forward NULL: CID 39
Coverity: Forward NULL: CID 42, 41
Coverity: Forward NULL: CID 44, 43, 36
Coverity: Forward NULL: CID 48
Coverity: Forward NULL: CID 49
Coverity: Forward NULL: CID 50
Coverity: Forward NULL: CID 51
Coverity: Forward NULL: CID 54, 53, 52
Fix additional transcoding assertions
Coverity: Negative returns: CID 121
Update link to newest compface in INSTALL
Coverity: Missing return: CID 604
Nelson Ferreira [Fri, 20 Jan 2012 18:11:39 +0000 (13:11 -0500)]
Avoid warnings
* src/ui/X11/device-x.c (x_get_visual_depth): Avoid uninitialized
return in fatal crash.
* src/ui/X11/frame-x.c (x_set_frame_properties): Change warn to
message, just in case...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:54:38 +0000 (12:54 -0500)]
Coverity: Forward NULL: CID 32
* src/extents.c (extent_list_delete_marker): Make sure p is not
dereference if NULL even in case of fatal crash.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:52:29 +0000 (12:52 -0500)]
Coverity: Forward NULL: CID 33
* src/alloc.c (build_string): Make sure to only dereference str if
not NULL even in fatal crash case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:50:42 +0000 (12:50 -0500)]
Coverity: Forward NULL: CID 34
* src/mem/ralloc.c (r_alloc_free): Make sure bloc is only
dereferenced if not NULL even in fatal crash case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:49:52 +0000 (12:49 -0500)]
Coverity: Forward NULL: CID 35
* src/mem/ralloc.c (r_re_alloc): Make sure bloc is only
dereferenced if not NULL even in fatal crash case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:47:31 +0000 (12:47 -0500)]
Coverity: Forward NULL: CID 37
* src/fns.c (concat): Make sure args_mse is not dereferenced in
case of NULL even in case of fatal crash.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:45:25 +0000 (12:45 -0500)]
Coverity: Forward NULL: CID 38
* src/doprnt.c (emacs_doprnt_1): Make sure to only dereference
largs if NULL even in case of a '*' format qualifier.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:44:04 +0000 (12:44 -0500)]
Coverity: Forward NULL: CID 39
* lib-src/etags.c (regex_tag_multiline): Make sure to abort if name is NULL
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:43:14 +0000 (12:43 -0500)]
Coverity: Forward NULL: CID 42, 41
* src/ui/redisplay-output.c (redisplay_clear_region): Make sure to
return from function for case of fatal crash after abort.
* src/ui/redisplay.c (regenerate_window): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:41:16 +0000 (12:41 -0500)]
Coverity: Forward NULL: CID 44, 43, 36
* src/ui/window.c (window_display_buffer): Make sure t is only
dereference if not NULL even in case of fatal crash.
* src/ui/window.c (set_window_display_buffer): Ditto.
* src/ui/window.c (window_display_lines): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:39:01 +0000 (12:39 -0500)]
Coverity: Forward NULL: CID 48
* src/ui/X11/device-x.c (x_get_visual_depth): make sure vi_out is
only dereference is not NULL, even in fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:35:49 +0000 (12:35 -0500)]
Coverity: Forward NULL: CID 49
* src/ui/lwlib/lwlib.c (instantiate_widget_instance): Make sure
function is not dereferenced as NULL even in fatal crash case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:34:43 +0000 (12:34 -0500)]
Coverity: Forward NULL: CID 50
* src/ui/lwlib/lwlib-Xlw.c (xlw_update_tab_control): Make sure cur
is not dereference when NULL.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:33:00 +0000 (12:33 -0500)]
Coverity: Forward NULL: CID 51
* src/ui/X11/event-Xt.c (Xt_timeout_callback): Make sure possible
NULL are not dereference, even in fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:31:22 +0000 (12:31 -0500)]
Coverity: Forward NULL: CID 54, 53, 52
* src/ui/X11/xgccache.c (gc_cache_lookup): Make sure not to derefence possible NULL pointers.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 17:28:55 +0000 (12:28 -0500)]
Merge branch 'for-steve' into njsf-cov
Nelson Ferreira [Fri, 20 Jan 2012 17:28:05 +0000 (12:28 -0500)]
Fix additional transcoding assertions
* src/buffer.h (TO_EXTERNAL_FORMAT): Remove the bad assert (ie not
valid in all conditions).
* src/buffer.h (TO_INTERNAL_FORMAT): Ditto.
* src/buffer.h (DFC_SOURCE_DATA_TO_ARGS): Do the proper assert to
the source conversion.
* src/buffer.h (DFC_SOURCE_C_STRING_TO_ARGS): Ditto.
* src/buffer.h (DFC_SOURCE_LISP_OPAQUE_TO_ARGS): Ditto.
* src/buffer.h (DFC_ALLOCA_USE_CONVERTED_DATA): Do the proper assert
to the converted data.
* src/buffer.h (DFC_MALLOC_USE_CONVERTED_DATA): Ditto.
* src/buffer.h (DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA): Ditto.
* src/buffer.h (DFC_C_STRING_MALLOC_USE_CONVERTED_DATA): Ditto.
* src/buffer.h (DFC_LISP_STRING_USE_CONVERTED_DATA): Ditto.
* src/buffer.h (DFC_LISP_OPAQUE_USE_CONVERTED_DATA): Ditto.
* src/alloc.c (ALLOCATE_FIXED_TYPE): Make sure to detect failed
allocations.
* src/alloc.c (ALLOCATE_ATOMIC_FIXED_TYPE): Ditto.
* src/alloc.c (make_uninit_string): Make sure the uninit string is
valid after construction.
* src/opaque.c (make_opaque): Make sure to detect failed
allocations even in the fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 15:38:36 +0000 (10:38 -0500)]
Coverity: Negative returns: CID 121
* src/ui/TTY/objects-tty.c (tty_font_spec_matches_charset):
Actually fix the negative return issue, for the fatal crash case.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 15:36:01 +0000 (10:36 -0500)]
Merge branch 'for-steve' into njsf-cov
Nelson Ferreira [Fri, 20 Jan 2012 15:35:51 +0000 (10:35 -0500)]
Update link to newest compface in INSTALL
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 15:35:23 +0000 (10:35 -0500)]
Coverity: Missing return: CID 604
* src/ui/glyphs.c (Fglyph_type): Tidy up a missing return caused
by a previous missing break...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Fri, 20 Jan 2012 04:55:22 +0000 (14:55 +1000)]
Coverity updates/fixes from Nelson
* merges: (21 commits)
Coverity: Missing break: CID 67
Coverity: Missing break: CID 68
Coverity: Missing break: CID 69
Coverity: Missing break: CID 72
Coverity: Missing break: CID 73
Coverity: Missing Break: CID 76
Coverity: Missing lock: CID 81
Coverity: Missing Lock: CID 82
Fix build
Coverity: Negative returns: CID 91
Coverity: Negative RETURNS: CID 106
Coverity: Negative returns: CID 107
Coverity: Negative Returns: CID 121
Coverity: Reverse INULL: CID 202
Coverity: Reverse INULL: CID 130
Coverity: Reverse Negative: CID 210
Coverity: UNINIT: CID 395
Coverity: Uninit: CID 396
Coverity: UNINIT: CID 602
Coverity: Uninit: CID 603
...
Nelson Ferreira [Fri, 20 Jan 2012 04:30:08 +0000 (23:30 -0500)]
Coverity: Missing break: CID 67
* src/chartab.c (char_table_type_to_symbol): Add break to account
for fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:29:29 +0000 (23:29 -0500)]
Coverity: Missing break: CID 68
* src/events/events.c (Fevent_properties): Add break to account
for fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:28:46 +0000 (23:28 -0500)]
Coverity: Missing break: CID 69
* src/events/events.c (event_equal): Add break to account for
fatal crash scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:18:18 +0000 (23:18 -0500)]
Coverity: Missing break: CID 72
* src/mule/file-coding.c (Fcoding_system_type): Add break to
account with fatal crash situation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:17:16 +0000 (23:17 -0500)]
Coverity: Missing break: CID 73
* src/mule/file-coding.c (eol_type_to_symbol): Add break to
account with fatal crash situation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:15:36 +0000 (23:15 -0500)]
Coverity: Missing Break: CID 76
* src/ui/glyphs.c (Fglyph_type): Add break to account for fatal
crash situation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:08:10 +0000 (23:08 -0500)]
Coverity: Missing lock: CID 81
* src/semaphore.h (sxe_refcounter_finish): Be "correct" and
pedantic about locking in refcounter_init
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 04:07:05 +0000 (23:07 -0500)]
Coverity: Missing Lock: CID 82
* src/semaphore.h (sxe_refcounter_new): Fix the refcounter finish
locking
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:46:00 +0000 (22:46 -0500)]
Fix build
* src/ui/X11/xgccache.c (gc_cache_lookup): Fix build (missing } )
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:43:57 +0000 (22:43 -0500)]
Coverity: Negative returns: CID 91
* lib-src/gnuserv.c (handle_unix_request): Handle error in
accept...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:42:32 +0000 (22:42 -0500)]
Coverity: Negative RETURNS: CID 106
* src/indent.c (vpix_motion): Try to handle more safely the
crashing fatally scenario...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:36:59 +0000 (22:36 -0500)]
Coverity: Negative returns: CID 107
* src/dumper.c (pdump): Make sure not to take invalid paths even
when abort is a no-op...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:34:49 +0000 (22:34 -0500)]
Coverity: Negative Returns: CID 121
* src/ui/TTY/objects-tty.c (tty_font_spec_matches_charset): Make
sure to abort in case of invariant violation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:26:32 +0000 (22:26 -0500)]
Coverity: Reverse INULL: CID 202
* src/mem/ralloc.c (update_heap_bloc_correspondence): Be extra
safe and do "abort" on violation of stated (in comment) invariant.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:22:37 +0000 (22:22 -0500)]
Coverity: Reverse INULL: CID 130
* src/media/sound.c (audio_device_finalise): Do nothing if header is NULL
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:19:45 +0000 (22:19 -0500)]
Coverity: Reverse Negative: CID 210
* src/process-unix.c (unix_kill_child_process): Make sure to test
for subtty non negative before calling process_signal_char.
* src/process-unix.c (process_signal_char): Make sure fd is non
negative.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:10:06 +0000 (22:10 -0500)]
Coverity: UNINIT: CID 395
* src/extents.c (extent_fragment_update): Make sure the glyph_bloc
is initialized.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 03:08:33 +0000 (22:08 -0500)]
Coverity: Uninit: CID 396
* src/fileio.c (file-truename) Make sure path is initialized before use.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 02:56:49 +0000 (21:56 -0500)]
Coverity: UNINIT: CID 602
* src/ui/X11/xgccache.c: More UNINIT cleanup
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 02:51:25 +0000 (21:51 -0500)]
Coverity: Uninit: CID 603
* src/ui/lwlib/lwlib-Xaw.c (xaw_generic_callback): Make sure
user_data is either initialized or not used :)
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Fri, 20 Jan 2012 02:44:23 +0000 (21:44 -0500)]
Fix get_dyna_doc CHAR_IO issue sync
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Steve Youngs [Thu, 19 Jan 2012 01:29:50 +0000 (11:29 +1000)]
Coding style cleanups from Aidan
* from-aidan:
Improve conformance with usual coding style in effi.c.
Aidan Kehoe [Wed, 18 Jan 2012 12:04:17 +0000 (22:04 +1000)]
Improve conformance with usual coding style in effi.c.
Qabcdef should hold the perfectly normal, interned symbol abcdef, its
C variable should not be named Q_abcdef, that would imply the keyword
:abcdef.
* effi.c:
Only declare the symbols corresponding to foreign types if they're
not declared elsewhere. Follow the usual convention as above.
* effi.c (FFI_TPTR): Change symbol names here.
* effi.c (Fffi_basic_type_p): Ditto.
* effi.c (ffi_canonicalise_type): Ditto.
* effi.c (Fffi_size_of_type): Ditto.
* effi.c (Fmake_ffi_object): Ditto.
* effi.c (Fffi_make_pointer): Ditto.
* effi.c (Fffi_load_library): Ditto.
* effi.c (ffi_type_align): Ditto.
* effi.c (ffi_fetch_foreign): Ditto.
* effi.c (Fffi_fetch): Ditto.
* effi.c (Fffi_aref): Ditto.
* effi.c (Fffi_store): Ditto.
* effi.c (Fffi_aset): Ditto.
* effi.c (Fffi_address_of): Ditto.
* effi.c (Fffi_lisp_object_to_pointer): Ditto.
* effi.c (extffi_setup_argument): Ditto.
* effi.c (Fx_device_display): Ditto.
* effi.c (ffi_callback_call_x86): Ditto.
* effi.c (Fffi_make_callback): Ditto.
* effi.c (syms_of_ffi): Use DEFSYMBOL where appropriate, document an
oddity with Qffiobjectp.
* general-slots.h: Move Qshort, Qvoid here.
* lisp.h: Remove Qshort, Qvoid from here.
* map.c: Ditto.
* map.c (map_LTX_init): Ditto.
* mule/file-coding.c: Ditto.
* mule/file-coding.c (syms_of_file_coding): Ditto.
* mule/file-coding.h: Ditto.
Signed-off-by: Aidan Kehoe <kehoea@parhasard.net>
Signed-off-by: Steve Youngs <steve@sxemacs.org>
Steve Youngs [Wed, 18 Jan 2012 23:38:10 +0000 (09:38 +1000)]
Coverity fixes from Nelson
* merges:
Coverity: FORWARD NULL: CID 54, 53, 52
Coverity: Forward NULL: CID 59, 58, 56
Coverity: CHAR_IO: CID 5,6,7,9
Coverity: UNINIT: CID 393
Coverity: UNINIT: CID 397
Coverity: UNINIT: CID 398
Coverity: UNINIT: CID 399
Coverity: Uninit: CID 400
Coverity: UNINIT: CID 401
Fix build
Fix build
Coverity: UNINIT: CID 402
Coverity: UNINIT: CID 403
Coverity: UNINIT: CID 405, 404
Coverity: UNUSED: CID 427
Coverity: Forward NULL: CID 439
Coverity: UNINIT: CID 599
Coverity: UNINIT: CID 600
Coverity: UNINIT: CID 601
Nelson Ferreira [Wed, 18 Jan 2012 20:34:07 +0000 (15:34 -0500)]
Coverity: FORWARD NULL: CID 54, 53, 52
* src/ui/X11/xgccache.c (gc_cache_lookup): Refactor abort() flow
through to shut up coverity.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 20:29:11 +0000 (15:29 -0500)]
Coverity: Forward NULL: CID 59, 58, 56
* src/ui/lwlib/lwlib-Xaw.c (xaw_generic_callback): Make sure you
do not dereference possible NULL val.
* src/ui/lwlib/lwlib-Xaw.c (wm_delete_window): Make sure widget
and kids are only used when valid.
* src/ui/lwlib/lwlib.c (replace_widget_value_tree): Make sure node
is only used if != NULL.
* src/ui/lwlib/lwlib.c (lw_map_widget_values): Make sure info is
only used if != NULL.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 19:51:21 +0000 (14:51 -0500)]
Coverity: CHAR_IO: CID 5,6,7,9
* lib-src/make-docfile.c (skip_white): Use proper return type of getc
* lib-src/make-docfile.c (read_lisp_symbol): Ditto
* src/signal.c (interrupt_signal): Ditto
* lib-src/make-docfile.c (scan_c_file): Do proper casting
* lib-src/make-docfile.c (get_dyna_doc): Let the casting
implementation do the truncation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:17:03 +0000 (13:17 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 18 Jan 2012 18:11:14 +0000 (13:11 -0500)]
Coverity: UNINIT: CID 393
* src/print.c (write_string_to_stdio_stream): handle the case
where the transcoding fails.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:06:23 +0000 (13:06 -0500)]
Coverity: UNINIT: CID 397
* src/buffer.c (directory_is_current_directory): Handle the case
of failed transcoding by attempting to use the non-transcoded
version. There is a high chance it is proper. Worst case it will
also fail, like the bad conversion would have prompted.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:02:11 +0000 (13:02 -0500)]
Coverity: UNINIT: CID 398
* src/effi.c (Fffi_store): Make sure tmp is only used in the mule
case if transcoding was proper.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 18:00:56 +0000 (13:00 -0500)]
Coverity: UNINIT: CID 399
* src/effi.c (Fffi_store): Make sure val_ext is only used if
transcoding was successful.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:58:57 +0000 (12:58 -0500)]
Coverity: Uninit: CID 400
* src/emacs.c (decode_path): make sure to return Qnil if
transcoding failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:57:36 +0000 (12:57 -0500)]
Coverity: UNINIT: CID 401
* src/media/media.c (Fmake_media_stream): make sure the stream is
only created if transcoding was ok.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:51:55 +0000 (12:51 -0500)]
Merge branch 'njsf-cov' into for-steve
Nelson Ferreira [Wed, 18 Jan 2012 17:35:32 +0000 (12:35 -0500)]
Fix build
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:34:57 +0000 (12:34 -0500)]
Fix build
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:26:44 +0000 (12:26 -0500)]
Coverity: UNINIT: CID 402
* src/print.c (Falternate_debugging_output): Make sure to handle
the case where transcoding failed.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:23:45 +0000 (12:23 -0500)]
Coverity: UNINIT: CID 403
* src/ui/X11/gui-x.c (button_item_to_widget_value): Make sure
intname is only used if properly transcoded.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:22:43 +0000 (12:22 -0500)]
Coverity: UNINIT: CID 405, 404
* src/ui/X11/frame-x.c (x_set_frame_properties): Make sure extval
is only used if properly transcoded.
* src/ui/X11/select-x.c (lisp_data_to_selection_data): Ditto.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 17:00:24 +0000 (12:00 -0500)]
Coverity: UNUSED: CID 427
* src/ui/insdel.c (init_buffer_text): Get rid of unused
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
Nelson Ferreira [Wed, 18 Jan 2012 16:57:17 +0000 (11:57 -0500)]
Coverity: Forward NULL: CID 439
* src/fns.c (concat): Manually skip and abort when
string_result_ptr is NULL. Coverity is actually right
here, because when we are in a fatal error handling,
assert will be a no-op, so we better just put an
abort for the other cases and not try to dereference...
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>