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 #49 Date: Sun, 30 Apr 2006 09:49:16 -0700 Message-ID: <200604301649.k3UGnGsf029109@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146416422 27292 80.91.229.2 (30 Apr 2006 17:00:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 17:00:22 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 30 19:00:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaFHO-0007Qj-7Q for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 19:00:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaFHN-0004uB-RP for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 13:00:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaFEw-0004AL-KA for emacs-devel@gnu.org; Sun, 30 Apr 2006 12:57:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaFEv-00049o-P9 for emacs-devel@gnu.org; Sun, 30 Apr 2006 12:57:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaFEv-00049d-Et for emacs-devel@gnu.org; Sun, 30 Apr 2006 12:57:45 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaFIY-0006zo-2n for emacs-devel@gnu.org; Sun, 30 Apr 2006 13:01:30 -0400 Original-Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.13.6/8.13.5) with ESMTP id k3UGnGsf029109 for ; Sun, 30 Apr 2006 09:49:16 -0700 (PDT) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 65 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-0.686, required 5, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_43 0.60, TW_CP 0.08, TW_XR 0.08) X-ICS-MailScanner-From: dann@vino.ics.uci.edu 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:53673 Archived-At: This is the last one, all the problem reports that still need to be analyzed have been posted here now. CID: 49 Checker: RESOURCE_LEAK (help) File: emacs/lib-src/etags.c Function: Prolog_functions Description: Variable "last" not freed or pointed-to in function "strncpy" 5411 static void 5412 Prolog_functions (inf) 5413 FILE *inf; 5414 { 5415 char *cp, *last; 5416 int len; 5417 int allocated; 5418 5419 allocated = 0; 5420 len = 0; 5421 last = NULL; 5422 At conditional (1): "feof == 0" taking true path At conditional (2): "((readline), (cp = (lb).buffer)), (1 != 0)" taking true path At conditional (4): "feof == 0" taking false path 5423 LOOP_ON_INPUT_LINES (inf, lb, cp) 5424 { At conditional (3): "*(cp + 0) == 0" taking true path 5425 if (cp[0] == '\0') /* Empty line */ 5426 continue; 5427 else if (iswhite (cp[0])) /* Not a predicate */ 5428 continue; 5429 else if (cp[0] == '/' && cp[1] == '*') /* comment. */ 5430 prolog_skip_comment (&lb, inf); 5431 else if ((len = prolog_pr (cp, last)) > 0) 5432 { 5433 /* Predicate or rule. Store the function name so that we 5434 only generate a tag for the first clause. */ 5435 if (last == NULL) Event alloc_fn: Called allocation function "xmalloc" [model] Event var_assign: Assigned variable "last" to storage returned from "xmalloc" Also see events: [var_assign][leaked_storage][pass_arg] 5436 last = xnew(len + 1, char); 5437 else if (len + 1 > allocated) 5438 xrnew (last, len + 1, char); 5439 allocated = len + 1; Event pass_arg: Variable "last" not freed or pointed-to in function "strncpy" Also see events: [alloc_fn][var_assign][leaked_storage] 5440 strncpy (last, cp, len); 5441 last[len] = '\0'; 5442 } 5443 } Event leaked_storage: Returned without freeing storage "last" Also see events: [alloc_fn][var_assign][pass_arg] 5444 }