To: vim_dev@googlegroups.com Subject: Patch 8.2.4126 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4126 Problem: Crash on exit when built with dynamic Tcl and EXITFREE is defined. (Dominique Pellé) Solution: Only call Tcl_Finalize() when initialized. (closes #9546) Files: src/if_tcl.c *** ../vim-8.2.4125/src/if_tcl.c 2022-01-02 21:26:12.315264334 +0000 --- src/if_tcl.c 2022-01-17 21:26:18.073325417 +0000 *************** *** 248,261 **** #endif } - #if defined(EXITFREE) || defined(PROTO) - void - vim_tcl_finalize(void) - { - Tcl_Finalize(); - } - #endif - #if defined(DYNAMIC_TCL) || defined(PROTO) static int stubs_initialized = FALSE; --- 248,253 ---- *************** *** 287,292 **** --- 279,295 ---- } #endif + #if defined(EXITFREE) || defined(PROTO) + void + vim_tcl_finalize(void) + { + # ifdef DYNAMIC_TCL + if (stubs_initialized) + # endif + Tcl_Finalize(); + } + #endif + void tcl_end(void) { *** ../vim-8.2.4125/src/version.c 2022-01-17 21:13:24.474867011 +0000 --- src/version.c 2022-01-17 21:31:31.587160145 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4126, /**/ -- ARTHUR: Then who is your lord? WOMAN: We don't have a lord. ARTHUR: What? DENNIS: I told you. We're an anarcho-syndicalist commune. We take it in turns to act as a sort of executive officer for the week. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///