On Do, 16 Jun 2016, Christian Brabandt wrote:
> Am 2016-06-15 23:05, schrieb Bram Moolenaar:
> >Christian Brabandt wrote:
> >
> >>> Have you tried after patch 7.4.1939? It fixes a problem where
> >>> w_jumplistlen was overwritten with a line number. Valgrind doesn't
> >>> catch this because it's still within a struct.
> >>
> >>I saw that patch, and it looks suspicious, but it was in a different
> >>section of the file. It still fails after 7.4.1940
> >
> >You mentioned w_jumplistlen went negative. I can't find any place
> >where
> >w_jumplistlen might be set to a negative value. And I don't think it
> >could happen by writing at w_jumplist[JUMPLISTSIZE] since we don't use
> >negative line numbers.
>
> It doesn't get negative. It more looks like this whole check
> (mark.c:175)
> if (++curwin->w_jumplistlen > JUMPLISTSIZE)
> {
> curwin->w_jumplistlen = JUMPLISTSIZE;
> vim_free(curwin->w_jumplist[0].fname);
> for (i = 1; i < JUMPLISTSIZE; ++i)
> curwin->w_jumplist[i - 1] = curwin->w_jumplist[i];
> }
>
> is never exexuted. In the debugger curwin->w_jumplistlen always is 0 so
> here:
> fm = &curwin->w_jumplist[curwin->w_jumplistlen - 1];
> it would read out of bounds.
Forget that. I don't see that anymore.
I am not really sure, what's happening. In the debugger I see, that
wp->w_perl_private is NULL, however for some reasons, the perl that
runs, does not consider this null and runs the
sv_setiv((SV *)wp->w_perl_private, 0);
I don't exactly understand the if_perl.xs script, but could it be, that
sizeof(void *) is different for perl and vim? I assume that somehow the perl
interpreter uses a different size of wp->w_perl_private variable
(possibly 64bit vs. 32bit of the Vim executable) and this seems to cause
this issue.
If I run perl -v I see this:
..Projects\vim\src>perl -v
,----
| This is perl 5, version 22, subversion 1 (v5.22.1) built for
MSWin32-x86-multi-thread-64int
| (with 1 registered patch, see perl -V for more detail)
|
| Copyright 1987-2015, Larry Wall
|
| Binary build 2201 [299574] provided by ActiveState http://www.ActiveState.com
| Built Dec 24 2015 12:36:28
|
| Perl may be copied only under the terms of either the Artistic License or the
| GNU General Public License, which may be found in the Perl 5 source kit.
|
| Complete documentation for Perl, including FAQ lists, should be found on
| this system using "man perl" or "perldoc perl". If you have access to the
| Internet, point your browser at http://www.perl.org/, the Perl Home Page.
`----
I can avoid this crash, by using this patch:
diff -r 405c0bba9d1d src/window.c
--- a/src/window.c Wed Jun 15 22:15:07 2016 +0200
+++ b/src/window.c Wed Jun 22 20:09:33 2016 +0200
@@ -4549,7 +4549,8 @@
#endif
#ifdef FEAT_PERL
- perl_win_free(wp);
+ if (wp->w_perl_private)
+ perl_win_free(wp);
#endif
#ifdef FEAT_PYTHON
But this breaks then later in the test_perl.vim Test with
>From test_perl.vim:
Found errors in Test_SvREFCNT():
function RunTheTest[9]..Test_SvREFCNT line 15: Expected False but got 83852072
TEST FAILURE
from
https://ci.appveyor.com/project/chrisbra/vim-win32-installer-33v6e/build/45/job/eic9bm4hwr1le2ak#L4723
But I don't know, how to fix this.
For reference, this happens on a windows 64 bit system, when building
the 32bit version of gvim
Best,
Christian
--
Puppe:
in Sekt'n Kind
--
--
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/d/optout.