unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: Problem report #122: base/src/emacs/src/coding.c (encode_coding_emacs_mule); UNINIT
Date: Tue, 02 Dec 2008 17:16:58 -0800	[thread overview]
Message-ID: <200812030120.mB31KQOM022813@mothra.ics.uci.edu> (raw)

CID: 122
Checker: UNINIT (help)
File: base/src/emacs/src/coding.c
Function: encode_coding_emacs_mule
Description: Using uninitialized value "code"

Event var_decl: Declared variable "code" without initializer
Also see events: [uninit_use][uninit_use]

2444 		  unsigned code;
2445 		  int dimension;
2446 		  int emacs_mule_id;
2447 		  unsigned char leading_codes[2];
2448 	
2449 		  if (preferred_charset_id >= 0)
2450 		    {
2451 		      charset = CHARSET_FROM_ID (preferred_charset_id);

At conditional (1): "(((charset)->unified_p != 0 || (charset)->method == 3 || (charset)->method == 4) ? ((encode_char != (charset)->invalid_code) ? 1 : (0)) : (((c < 65536) ? (charset)->fast_map[c >> 10] & 1 << c >> 7 & 7 : ((charset)->fast_map[(c >> 15 + 62)] & 1 << c >> 12 & 7)) != 0 && (((charset)->method == 0) ? c >= (charset)->min_char && c <= (charset)->max_char : ((((charset)->method == 1 && (charset)->compact_codes_p != 0) ? ((((c < 128 && ((0), (((0), (((0), ((Vcharset_hash_table & -8)->key_and_value & -8))->contents[((2 * (charset)->hash_index) + 1)] & -8))->contents[5] & -8))->ascii & 7 == 4 && ((0), (((0), (((0), (((0), ((Vcharset_hash_table & -8)->key_and_value & -8))->contents[((2 * (charset)->hash_index) + 1)] & -8))->contents[5] & -8))->ascii & -8))->size & 4611686018428436480 == 4611686018428436480 && ((0), (((0), (((0), (((0), ((Vcharset_hash_table & -8)->key_and_value & -8))->contents[((2 * (charset)->hash_index) + 1)] & -8))->contents[5] & -8))->ascii & -8))->contents[c] != Qnil) ? ((0), (((0), (((0), (((0), ((Vcharset_hash_table & -8)->key_and_value & -8))->contents[((2 * (charset)->hash_index) + 1)] & -8))->contents[5] & -8))->ascii & -8))->contents[c] : (char_table_ref)) != Qnil) ? 1 : (0)) : (((encode_char != (charset)->invalid_code) ? 1 : (0)))))) != 0)) == 0" taking false path

2452 		      if (! CHAR_CHARSET_P (c, charset))
2453 			charset = char_charset (c, charset_list, NULL);
2454 		    }
2455 		  else
2456 		    charset = char_charset (c, charset_list, &code);

At conditional (2): "charset == 0" taking false path

2457 		  if (! charset)
2458 		    {
2459 		      c = coding->default_char;
2460 		      if (ASCII_CHAR_P (c))
2461 			{
2462 			  EMIT_ONE_ASCII_BYTE (c);
2463 			  continue;
2464 			}
2465 		      charset = char_charset (c, charset_list, &code);
2466 		    }
2467 		  dimension = CHARSET_DIMENSION (charset);
2468 		  emacs_mule_id = CHARSET_EMACS_MULE_ID (charset);

At conditional (3): "emacs_mule_id < 160" taking true path
At conditional (4): "0" taking false path

2469 		  EMACS_MULE_LEADING_CODES (emacs_mule_id, leading_codes);

At conditional (5): "multibytep != 0" taking true path
At conditional (6): "ch >= 128" taking true path
At conditional (7): "ch <= 127" taking false path
At conditional (8): "ch <= 2047" taking false path
At conditional (9): "ch <= 65535" taking false path
At conditional (10): "0" taking false path
At conditional (11): "0" taking false path

2470 		  EMIT_ONE_BYTE (leading_codes[0]);

At conditional (12): "leading_codes[1] != 0" taking true path

2471 		  if (leading_codes[1])

At conditional (13): "multibytep != 0" taking true path
At conditional (14): "ch >= 128" taking true path
At conditional (15): "ch <= 127" taking false path
At conditional (16): "ch <= 2047" taking false path
At conditional (17): "ch <= 65535" taking false path
At conditional (18): "0" taking false path
At conditional (19): "0" taking false path

2472 		    EMIT_ONE_BYTE (leading_codes[1]);

At conditional (20): "dimension == 1" taking true path

2473 		  if (dimension == 1)

Event uninit_use: Using uninitialized value "code"
Also see events: [var_decl][uninit_use]
At conditional (21): "multibytep != 0" taking true path

2474 		    EMIT_ONE_BYTE (code | 0x80);
2475 		  else
2476 		    {

Event uninit_use: Using uninitialized value "code"
Also see events: [var_decl][uninit_use]

2477 		      code |= 0x8080;
2478 		      EMIT_ONE_BYTE (code >> 8);
2479 		      EMIT_ONE_BYTE (code & 0xFF);
2480 		    }
2481 		}
2482 	    }





             reply	other threads:[~2008-12-03  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03  1:16 Dan Nicolaescu [this message]
2008-12-03  6:43 ` Problem report #122: base/src/emacs/src/coding.c (encode_coding_emacs_mule); UNINIT Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812030120.mB31KQOM022813@mothra.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).