On Friday, September 7, 2012 8:05:52 PM UTC+4, Sean Estabrooks wrote:
> > I've tested it with mercurial tip (that is v7-3-659) in a first place. I've
> > reverted sources to v7-3-652 when this patch has been applied and still
> > reproduce the problem.
>
>
>
> Hi Maxim,
>
>
>
> Just can't find a way to reproduce the problem here, but reality always wins
> ;o) Could you submit your patch for inclusion?
>
>
>
> Thanks,
>
> Sean
Ok. Should I create a new theme in order to submit a patch?
I think, I got to the bottom of this problem, "et#" format for PyArg_ParseTuple
expects third parameter to be an int * that is a pointer to a 4 byte variable,
but on Linux x86_64 sizeof(Py_ssize_t) == 8, so after parsing parameters we got
half-initialized half-garbled len. On platforms where sizeof(Py_ssize_t) ==
sizeof(int) this bug is unreproducible =)
Patch is fairly simple
*** /tmp/extdiff.PnMpCM/vim.1052677493be/src/if_py_both.h 2012-09-08
01:36:57.452192738 +0400
--- /home/maxim/Projects/vim/src/if_py_both.h 2012-09-08 01:35:34.074187900
+0400
***************
*** 74,80 ****
static PyObject *
OutputWrite(PyObject *self, PyObject *args)
{
! Py_ssize_t len;
char *str = NULL;
int error = ((OutputObject *)(self))->error;
--- 74,80 ----
static PyObject *
OutputWrite(PyObject *self, PyObject *args)
{
! Py_ssize_t len = 0;
char *str = NULL;
int error = ((OutputObject *)(self))->error;
--
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