Aliaksandr Rahalevich wrote:
> It works with
> set regexpengine=1
> but fails to open file with regexpengine=2.
>
> It's definitely working with 1242 patchset, but fails with latest.

Hi

You explanations are not detailed and the attached files
are not useful: a core file is useless without your vim
executable.  Nevetherless, I can see a bug when using
a ruby file (attached) with re=2 and Vim-7.3.1270:

$ valgrind --num-callers=50 --track-origins=yes \
   vim -u NONE \
   -c 'syntax on' \
   -c ':norm G' \
   /usr/share/inkscape/extensions/simplepath.rb

==5196== Memcheck, a memory error detector
==5196== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==5196== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==5196== Command: ./vim -u NONE -c syntax\ on -c :norm\ G
/usr/share/inkscape/extensions/simplepath.rb
==5196== Parent PID: 4616
==5196==
==5196== Invalid write of size 8
==5196==    at 0x4C2CB05: memcpy@GLIBC_2.2.5 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5196==    by 0x573D44: addstate_here (regexp_nfa.c:4233)
==5196==    by 0x5755AA: nfa_regmatch (regexp_nfa.c:5265)
==5196==    by 0x577AB7: nfa_regtry (regexp_nfa.c:6217)
==5196==    by 0x57819B: nfa_regexec_both (regexp_nfa.c:6401)
==5196==    by 0x578614: nfa_regexec_multi (regexp_nfa.c:6650)
==5196==    by 0x578802: vim_regexec_multi (regexp.c:8088)
==5196==    by 0x5C33BD: syn_regexec (syntax.c:3272)
==5196==    by 0x5C0DB0: syn_current_attr (syntax.c:2092)
==5196==    by 0x5C039E: syn_finish_line (syntax.c:1770)
==5196==    by 0x5BDFF5: syntax_start (syntax.c:604)
==5196==    by 0x57DE7D: win_line (screen.c:2886)
==5196==    by 0x57B9B4: win_update (screen.c:1870)
==5196==    by 0x578FD1: update_screen (screen.c:536)
==5196==    by 0x63BC25: main_loop (main.c:1232)
==5196==    by 0x63B790: main (main.c:1020)
==5196==  Address 0x10801638 is not stack'd, malloc'd or (recently) free'd
==5196==
==5196== Invalid read of size 8
==5196==    at 0x4C2CA2E: memcpy@GLIBC_2.2.5 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5196==    by 0x573D92: addstate_here (regexp_nfa.c:4236)
==5196==    by 0x5755AA: nfa_regmatch (regexp_nfa.c:5265)
==5196==    by 0x577AB7: nfa_regtry (regexp_nfa.c:6217)
==5196==    by 0x57819B: nfa_regexec_both (regexp_nfa.c:6401)
==5196==    by 0x578614: nfa_regexec_multi (regexp_nfa.c:6650)
==5196==    by 0x578802: vim_regexec_multi (regexp.c:8088)
==5196==    by 0x5C33BD: syn_regexec (syntax.c:3272)
==5196==    by 0x5C0DB0: syn_current_attr (syntax.c:2092)
==5196==    by 0x5C039E: syn_finish_line (syntax.c:1770)
==5196==    by 0x5BDFF5: syntax_start (syntax.c:604)
==5196==    by 0x57DE7D: win_line (screen.c:2886)
==5196==    by 0x57B9B4: win_update (screen.c:1870)
==5196==    by 0x578FD1: update_screen (screen.c:536)
==5196==    by 0x63BC25: main_loop (main.c:1232)
==5196==    by 0x63B790: main (main.c:1020)
==5196==  Address 0x108010f0 is 0 bytes after a block of size 62,560 alloc'd
==5196==    at 0x4C2B3F8: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5196==    by 0x50D8B0: lalloc (misc2.c:929)
==5196==    by 0x574EE6: nfa_regmatch (regexp_nfa.c:4959)
==5196==    by 0x577AB7: nfa_regtry (regexp_nfa.c:6217)
==5196==    by 0x57819B: nfa_regexec_both (regexp_nfa.c:6401)
==5196==    by 0x578614: nfa_regexec_multi (regexp_nfa.c:6650)
==5196==    by 0x578802: vim_regexec_multi (regexp.c:8088)
==5196==    by 0x5C33BD: syn_regexec (syntax.c:3272)
==5196==    by 0x5C0DB0: syn_current_attr (syntax.c:2092)
==5196==    by 0x5C039E: syn_finish_line (syntax.c:1770)
==5196==    by 0x5BDFF5: syntax_start (syntax.c:604)
==5196==    by 0x57DE7D: win_line (screen.c:2886)
==5196==    by 0x57B9B4: win_update (screen.c:1870)
==5196==    by 0x578FD1: update_screen (screen.c:536)
==5196==    by 0x63BC25: main_loop (main.c:1232)
==5196==    by 0x63B790: main (main.c:1020)
==5196==
==5196== Invalid read of size 8
==5196==    at 0x4C2CA20: memcpy@GLIBC_2.2.5 (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5196==    by 0x573D92: addstate_here (regexp_nfa.c:4236)
==5196==    by 0x5755AA: nfa_regmatch (regexp_nfa.c:5265)
==5196==    by 0x577AB7: nfa_regtry (regexp_nfa.c:6217)
==5196==    by 0x57819B: nfa_regexec_both (regexp_nfa.c:6401)
==5196==    by 0x578614: nfa_regexec_multi (regexp_nfa.c:6650)
==5196==    by 0x578802: vim_regexec_multi (regexp.c:8088)
==5196==    by 0x5C33BD: syn_regexec (syntax.c:3272)
==5196==    by 0x5C0DB0: syn_current_attr (syntax.c:2092)
==5196==    by 0x5C039E: syn_finish_line (syntax.c:1770)
==5196==    by 0x5BDFF5: syntax_start (syntax.c:604)
==5196==    by 0x57DE7D: win_line (screen.c:2886)
==5196==    by 0x57B9B4: win_update (screen.c:1870)
==5196==    by 0x578FD1: update_screen (screen.c:536)
==5196==    by 0x63BC25: main_loop (main.c:1232)
==5196==    by 0x63B790: main (main.c:1020)
==5196==  Address 0x108010f8 is 8 bytes after a block of size 62,560 alloc'd
==5196==    at 0x4C2B3F8: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5196==    by 0x50D8B0: lalloc (misc2.c:929)
==5196==    by 0x574EE6: nfa_regmatch (regexp_nfa.c:4959)
==5196==    by 0x577AB7: nfa_regtry (regexp_nfa.c:6217)
==5196==    by 0x57819B: nfa_regexec_both (regexp_nfa.c:6401)
==5196==    by 0x578614: nfa_regexec_multi (regexp_nfa.c:6650)
==5196==    by 0x578802: vim_regexec_multi (regexp.c:8088)
==5196==    by 0x5C33BD: syn_regexec (syntax.c:3272)
==5196==    by 0x5C0DB0: syn_current_attr (syntax.c:2092)
==5196==    by 0x5C039E: syn_finish_line (syntax.c:1770)
==5196==    by 0x5BDFF5: syntax_start (syntax.c:604)
==5196==    by 0x57DE7D: win_line (screen.c:2886)
==5196==    by 0x57B9B4: win_update (screen.c:1870)
==5196==    by 0x578FD1: update_screen (screen.c:536)
==5196==    by 0x63BC25: main_loop (main.c:1232)
==5196==    by 0x63B790: main (main.c:1020)
==5196==

valgrind: m_mallocfree.c:266 (mk_plain_bszB): Assertion 'bszB != 0' failed.
valgrind: This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata.  If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away.  Please try that before reporting this as a bug.

==5196==    at 0x3804C6CF: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x3804C812: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x38000883: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x3805887E: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x38020C95: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x38021280: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x3802146A: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x3808F656: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)
==5196==    by 0x3809E68C: ??? (in /usr/lib/valgrind/memcheck-amd64-linux)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==5196==    at 0x4C2B3F8: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5196==    by 0x50D8B0: lalloc (misc2.c:929)
==5196==    by 0x574EBB: nfa_regmatch (regexp_nfa.c:4957)
==5196==    by 0x5748DE: recursive_regmatch (regexp_nfa.c:4619)
==5196==    by 0x575406: nfa_regmatch (regexp_nfa.c:5211)
==5196==    by 0x577AB7: nfa_regtry (regexp_nfa.c:6217)
==5196==    by 0x57819B: nfa_regexec_both (regexp_nfa.c:6401)
==5196==    by 0x578614: nfa_regexec_multi (regexp_nfa.c:6650)
==5196==    by 0x578802: vim_regexec_multi (regexp.c:8088)
==5196==    by 0x5C33BD: syn_regexec (syntax.c:3272)
==5196==    by 0x5C0DB0: syn_current_attr (syntax.c:2092)
==5196==    by 0x5C039E: syn_finish_line (syntax.c:1770)
==5196==    by 0x5BDFF5: syntax_start (syntax.c:604)
==5196==    by 0x57DE7D: win_line (screen.c:2886)
==5196==    by 0x57B9B4: win_update (screen.c:1870)
==5196==    by 0x578FD1: update_screen (screen.c:536)
==5196==    by 0x63BC25: main_loop (main.c:1232)
==5196==    by 0x63B790: main (main.c:1020)

Thread 2: status = VgTs_WaitSys
==5196==    at 0x858E033: ??? (syscall-template.S:82)
==5196==    by 0x7E4DE4B: ??? (in /usr/lib/libtcl8.5.so.0)
==5196==    by 0x7B5FE99: start_thread (pthread_create.c:308)
==5196==    by 0x8594CCC: clone (clone.S:112)

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


Attachment: simplepath.rb
Description: Binary data

Raspunde prin e-mail lui