* Bram Moolenaar <[email protected]> [2013-05-31 20:49 +0200]:

[...]
> Note that this solves it by commenting out a function that apparently
> fails.  I hope you can figure out why it fails, so we can re-enable the
> tests.
[...]

* Jun T. <[email protected]> [2013-06-06 10:39 +0900]:

> Hi all. I'm new to this list.
> 
> I'm getting core dump (segfault) in test86;
> vim 7.3.1128 on Mac OS X and Linux, both with Python 2.7/64bit.
> Does this happen only to me?

Me too :-(

> It seems that the problem is in OutputWritelines().
> PyArg_Parse(..., "et#",.., &len) returns a bogus value for len,
> because len is defined as PyInt (i.e., Py_ssize_t, 64bit), but
> a version of PyArg_Parse() in use is NOT ssize_t-clean and
> the value returned for len is int (32bit).
> 
> To use ssize_t-clean version of PyArg_Parse(), the macro
> PY_SSIZE_T_CELAN must be defined BEFORE including Python.h.
> 
> So a possible (but not necessarily the best) fix is to modify
> 
> #include <Python.h>
> 
> in if_pytyon.c (and if_python3.c also?) to
> 
> #define PY_SSIZE_T_CELAN
> #include <Python.h>
> #undef PY_SSIZE_T_CELAN
> (it will be re-defined at a few lines below for Python 2.5 or later).

Build and test suite went fine with:

#python3-config --configdir
/usr/lib/python3.2/config-3.2mu

#python-config --configdir
/usr/lib/python2.7/config-x86_64-linux-gnu

Same on ppc:
/usr/lib/python2.7/config-powerpc-linux-gnu
/usr/lib/python3.2/config-3.2mu

Same on i386:
/usr/lib/python2.7/config-i386-linux-gnu
/usr/lib/python3.2/config-3.2mu


diff -r c4bb9860b91e src/if_python.c
--- a/src/if_python.c   Tue Jun 04 22:13:50 2013 +0200
+++ b/src/if_python.c   Thu Jun 06 22:27:34 2013 +0200
@@ -53,7 +53,9 @@
 # undef _XOPEN_SOURCE  /* pyconfig.h defines it as well. */
 #endif
 
+#define PY_SSIZE_T_CELAN
 #include <Python.h>
+#undef PY_SSIZE_T_CELAN
 #if defined(MACOS) && !defined(MACOS_X_UNIX)
 # include "macglue.h"
 # include <CodeFragments.h>
diff -r c4bb9860b91e src/if_python3.c
--- a/src/if_python3.c  Tue Jun 04 22:13:50 2013 +0200
+++ b/src/if_python3.c  Thu Jun 06 22:27:34 2013 +0200
@@ -61,7 +61,9 @@
 # undef _XOPEN_SOURCE  /* pyconfig.h defines it as well. */
 #endif
 
+#define PY_SSIZE_T_CELAN
 #include <Python.h>
+#undef PY_SSIZE_T_CELAN
 #if defined(MACOS) && !defined(MACOS_X_UNIX)
 # include "macglue.h"
 # include <CodeFragments.h>




-- 
  Excellent day for drinking heavily.
  Spike the office water cooler;-)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui