To: vim_dev@googlegroups.com Subject: Patch 7.3.497 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.3.497 Problem: Crash when doing ":python print" and compiled with gcc and the optimizer enabled. Solution: Avoid the crash, doesn't really fix the problem. (Christian Brabandt) Files: src/if_py_both.h *** ../vim-7.3.496/src/if_py_both.h 2012-02-04 20:17:21.000000000 +0100 --- src/if_py_both.h 2012-04-20 13:24:31.000000000 +0200 *************** *** 77,82 **** --- 77,87 ---- if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len)) return NULL; + /* TODO: This works around a gcc optimizer problem and avoids Vim + * from crashing. Should find a real solution. */ + if (str == NULL) + return NULL; + Py_BEGIN_ALLOW_THREADS Python_Lock_Vim(); writer((writefn)(error ? emsg : msg), (char_u *)str, len); *** ../vim-7.3.496/src/version.c 2012-04-13 19:11:16.000000000 +0200 --- src/version.c 2012-04-20 13:26:22.000000000 +0200 *************** *** 716,717 **** --- 716,719 ---- { /* Add new patch number below this line */ + /**/ + 497, /**/ -- There can't be a crisis today, my schedule is already full. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///