home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.040 < prev    next >
Encoding:
Internet Message Format  |  2013-09-24  |  2.3 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.040
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.040
  11. Problem:    Valgrind error on exit when a script-local variable holds a
  12.         reference to the scope of another script.
  13. Solution:   First clear all variables, then free the scopes. (ZyX)
  14. Files:        src/eval.c
  15.  
  16.  
  17. *** ../vim-7.4.039/src/eval.c    2013-08-30 16:35:41.000000000 +0200
  18. --- src/eval.c    2013-09-25 20:28:15.000000000 +0200
  19. ***************
  20. *** 915,926 ****
  21.       /* autoloaded script names */
  22.       ga_clear_strings(&ga_loaded);
  23.   
  24. !     /* script-local variables */
  25.       for (i = 1; i <= ga_scripts.ga_len; ++i)
  26. -     {
  27.       vars_clear(&SCRIPT_VARS(i));
  28.       vim_free(SCRIPT_SV(i));
  29. -     }
  30.       ga_clear(&ga_scripts);
  31.   
  32.       /* unreferenced lists and dicts */
  33. --- 915,927 ----
  34.       /* autoloaded script names */
  35.       ga_clear_strings(&ga_loaded);
  36.   
  37. !     /* Script-local variables. First clear all the variables and in a second
  38. !      * loop free the scriptvar_T, because a variable in one script might hold
  39. !      * a reference to the whole scope of another script. */
  40.       for (i = 1; i <= ga_scripts.ga_len; ++i)
  41.       vars_clear(&SCRIPT_VARS(i));
  42. +     for (i = 1; i <= ga_scripts.ga_len; ++i)
  43.       vim_free(SCRIPT_SV(i));
  44.       ga_clear(&ga_scripts);
  45.   
  46.       /* unreferenced lists and dicts */
  47. *** ../vim-7.4.039/src/version.c    2013-09-25 19:13:32.000000000 +0200
  48. --- src/version.c    2013-09-25 20:30:06.000000000 +0200
  49. ***************
  50. *** 740,741 ****
  51. --- 740,743 ----
  52.   {   /* Add new patch number below this line */
  53. + /**/
  54. +     40,
  55.   /**/
  56.  
  57. -- 
  58.     A KNIGHT rides into shot and hacks him to the ground.  He rides off.
  59.     We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
  60.     twin-set emerges from the trees and looks in horror at the body of her
  61.     HUSBAND.
  62. MRS HISTORIAN: FRANK!
  63.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  64.  
  65.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  66. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  67. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  68.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  69.