From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Problem report #118: base/src/emacs/src/charset.c (load_charset_map); UNINIT Date: Tue, 02 Dec 2008 17:18:42 -0800 Message-ID: <200812030119.mB31JWan022801@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228267215 973 80.91.229.12 (3 Dec 2008 01:20:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 01:20:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 02:21:18 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7gQW-0002Xe-Nv for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 02:21:17 +0100 Original-Received: from localhost ([127.0.0.1]:57079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7gPM-0002wA-6S for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2008 20:20:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7gOy-0002mB-G9 for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:19:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7gOx-0002ln-Ql for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:19:40 -0500 Original-Received: from [199.232.76.173] (port=37532 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7gOx-0002lj-La for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:19:39 -0500 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:48725) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1L7gOx-0008Hw-34 for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:19:39 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mB31JWAu018090 for ; Tue, 2 Dec 2008 17:19:32 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mB31JWan022801; Tue, 2 Dec 2008 17:19:32 -0800 (PST) Original-Lines: 175 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mB31JWAu018090 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106467 Archived-At: CID: 118 Checker: UNINIT (help) File: base/src/emacs/src/charset.c Function: load_charset_map Description: Using uninitialized value "table" in call to function "char_table_ref" Event var_decl: Declared variable "table" without initializer Also see events: [uninit_use_in_call][uninit_use_in_call] 203 Lisp_Object vec, table; 204 unsigned max_code = CHARSET_MAX_CODE (charset); 205 int ascii_compatible_p = charset->ascii_compatible_p; 206 int min_char, max_char, nonascii_min_char; 207 int i; 208 unsigned char *fast_map = charset->fast_map; 209 At conditional (1): "n_entries <= 0" taking false path 210 if (n_entries <= 0) 211 return; 212 At conditional (2): "control_flag > 0" taking false path 213 if (control_flag > 0) 214 { 215 int n = CODE_POINT_TO_INDEX (charset, max_code) + 1; 216 217 table = Fmake_char_table (Qnil, Qnil); 218 if (control_flag == 1) 219 vec = Fmake_vector (make_number (n), make_number (-1)); 220 else if (! CHAR_TABLE_P (Vchar_unify_table)) 221 Vchar_unify_table = Fmake_char_table (Qnil, Qnil); 222 223 charset_map_loaded = 1; 224 } 225 226 min_char = max_char = entries->entry[0].c; 227 nonascii_min_char = MAX_CHAR; At conditional (3): "i < n_entries" taking true path 228 for (i = 0; i < n_entries; i++) 229 { 230 unsigned from, to; 231 int from_index, to_index; 232 int from_c, to_c; 233 int idx = i % 0x10000; 234 At conditional (4): "i > 0" taking false path 235 if (i > 0 && idx == 0) 236 entries = entries->next; 237 from = entries->entry[idx].from; 238 to = entries->entry[idx].to; 239 from_c = entries->entry[idx].c; At conditional (5): "(charset)->code_linear_p != 0" taking true path 240 from_index = CODE_POINT_TO_INDEX (charset, from); At conditional (6): "from == to" taking true path 241 if (from == to) 242 { 243 to_index = from_index; 244 to_c = from_c; 245 } 246 else 247 { 248 to_index = CODE_POINT_TO_INDEX (charset, to); 249 to_c = from_c + (to_index - from_index); 250 } At conditional (7): "from_index < 0" taking false path At conditional (8): "to_index < 0" taking false path 251 if (from_index < 0 || to_index < 0) 252 continue; 253 At conditional (9): "control_flag < 2" taking true path 254 if (control_flag < 2) 255 { 256 int c; 257 At conditional (10): "to_c > max_char" taking true path 258 if (to_c > max_char) 259 max_char = to_c; 260 else if (from_c < min_char) 261 min_char = from_c; At conditional (11): "ascii_compatible_p != 0" taking true path 262 if (ascii_compatible_p) 263 { At conditional (12): "from_c >= 128" taking true path 264 if (! ASCII_BYTE_P (from_c)) 265 { At conditional (13): "from_c < nonascii_min_char" taking true path 266 if (from_c < nonascii_min_char) 267 nonascii_min_char = from_c; 268 } 269 else if (! ASCII_BYTE_P (to_c)) 270 { 271 nonascii_min_char = 0x80; 272 } 273 } 274 At conditional (14): "c <= to_c" taking true path At conditional (17): "c <= to_c" taking false path 275 for (c = from_c; c <= to_c; c++) At conditional (15): "c < 65536" taking true path At conditional (16): "0" taking false path 276 CHARSET_FAST_MAP_SET (c, fast_map); 277 At conditional (18): "control_flag == 1" taking true path 278 if (control_flag == 1) 279 { 280 unsigned code = from; 281 At conditional (19): "(charset)->compact_codes_p != 0" taking true path 282 if (CHARSET_COMPACT_CODES_P (charset)) At conditional (20): "1" taking true path 283 while (1) 284 { 285 ASET (vec, from_index, make_number (from_c)); Event uninit_use_in_call: Using uninitialized value "table" in call to function "char_table_ref" [model] Also see events: [var_decl][uninit_use_in_call] At conditional (21): "from_c < 128" taking false path 286 if (NILP (CHAR_TABLE_REF (table, from_c))) 287 CHAR_TABLE_SET (table, from_c, make_number (code)); 288 if (from_index == to_index) 289 break; 290 from_index++, from_c++; 291 code = INDEX_TO_CODE_POINT (charset, from_index); 292 } 293 else 294 for (; from_index <= to_index; from_index++, from_c++) 295 { 296 ASET (vec, from_index, make_number (from_c)); Event uninit_use_in_call: Using uninitialized value "table" in call to function "char_table_ref" [model] Also see events: [var_decl][uninit_use_in_call] 297 if (NILP (CHAR_TABLE_REF (table, from_c))) 298 CHAR_TABLE_SET (table, from_c, make_number (from_index)); 299 } 300 } 301 } 302 else 303