emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two memory leaks


From: YAMAMOTO Mitsuharu
Subject: Two memory leaks
Date: Wed, 24 Sep 2003 23:33:07 +0900 (JST)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the address@hidden mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Two memory leaks were found with the help of leaks(1) command in Mac
OS X.

1. `range_table_work.table' in regex_compile (regex.c) is not freed if
   the compilation is succeeded.  The following patch would fix the
   problem.

*** regex.c.~1.187.~    Tue Sep  2 09:10:05 2003
--- regex.c     Wed Sep 24 18:28:42 2003
***************
*** 3514,3521 ****
    if (syntax & RE_NO_POSIX_BACKTRACKING)
      BUF_PUSH (succeed);
  
-   free (compile_stack.stack);
- 
    /* We have succeeded; set the length of the buffer.  */
    bufp->used = b - bufp->buffer;
  
--- 3514,3519 ----
***************
*** 3555,3561 ****
    }
  #endif /* not MATCH_MAY_ALLOCATE */
  
!   return REG_NOERROR;
  } /* regex_compile */
  
  /* Subroutines for `regex_compile'.  */
--- 3553,3559 ----
    }
  #endif /* not MATCH_MAY_ALLOCATE */
  
!   FREE_STACK_RETURN (REG_NOERROR);
  } /* regex_compile */
  
  /* Subroutines for `regex_compile'.  */


2. `fontp->font_encoder' in fs_load_font (fontset.c) may be overridden
   by 

          if (find_ccl_program_func)
            (*find_ccl_program_func) (fontp);

   without being freed when `fontp' is already an element of
   `dpyinfo->font_table' in x_load_font (xterm.c) and has non-NULL
   font_encoder.

                                     YAMAMOTO Mitsuharu
                                address@hidden


In GNU Emacs 21.3.50.1 (powerpc-apple-darwin6.8)
 of 2003-09-24 on Macintosh.local.
configured using `configure '--without-x' 'CFLAGS=-Os''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ja_JP
  locale-coding-system: japanese-iso-8bit
  default-enable-multibyte-characters: t

Recent input:
<menu-bar> <help-menu> <report-emacs-bug>

Recent messages:
Loading term/keyswap (source)...done
Loading subst-ksc...done
Loading subst-gb2312...done
Loading subst-big5...done
Loading subst-jis...done
Loading encoded-kb...done
Loading jka-compr...done
Loading image...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]