Christian Brabandt wrote:

> Am 2014-11-20 00:40, schrieb Daniel Hahler:
> > line 41: let append = matchstr(keeper,'\_s\@<!\s*$')
> 
> That is enough to trigger the bug, with a long enough line.
> 
> I believe there was still a problem in regexp_nfa.c which
> prevented patch 497 to work properly and causes the
> "conditional jump depends on uninitialised value"
> in valgrind.
> 
> Can you check, if the attached patch fixes it for you?

The problem appears to be that returning NFA_TOO_EXPENSIVE is handled as
non-zero, thus as if there was a match.  To make it consistent we should
return <= 0 for no match and > 0 for a match in all the *regexec_nl()
functions.  And check for "> 0" in vim_regexec_both().

-- 
Biting someone with your natural teeth is "simple assault," while biting
someone with your false teeth is "aggravated assault."
                [real standing law in Louisana, United States of America]

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
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.

Raspunde prin e-mail lui