On Thu, Dec 31, 2020 at 10:24:55AM +0100, Dominique Pellé 
<[email protected]> wrote:

> raf <[email protected]> wrote:
> 
> > Hi,
> >
> > Happy New Year Bram et al!
> >
> > I just tried to compile and test vim for the
> > first time in ages and got a segmentation fault.
> >
> > Environment:
> >
> >   macos-10.14.6
> >   vim-8.2 patches 1-2251
> >   XQuartz 2.7.11 (xorg-server 1.18.4)
> >   (plus other xorg stuff via macports might be relevant)
> 
> Hi
> 
> Athena GUI works fine for me on Linux x86_6.
> 
> Can you try building Vim with the address sanitizer (asan)?
> It should only be a matter of uncommenting this line vim
> vim/src/Makefile:
> 
> SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
> 
> Then:
> 
> $ make clean ; make
> 
> Then try to reproduce the crash. If a memory error happens, asan will
> dump useful information on stderr.  You may need to redirect stderr
> like this:
> 
> $ cd vim/src ; ./vim 2> asan.log

With address sanitizing, it doesn't crash.
Maybe I should install it like that. :-)
I wonder if I'd notice the performance penalty.

I do get 3 or 4 test failures, though, But hopefully, they're not serious:

  Executed:  3733 Tests
   Skipped:    48 Tests
    FAILED:     4 Tests

  Failures:
        From test_channel.vim:
        Found errors in Test_out_cb():
        Run 1:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[468]..function 
RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>117
 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
        Run 2:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>120
 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
        Run 3:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>123
 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
        Run 4:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>126
 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
        Run 5:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_out_cb[36]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>129
 line 1: Expected {'one': 1, 'two': 2, 'three': 3} but got ''
        Flaky test failed too often, giving up
        From test_options.vim:
        Found errors in Test_set_ttytype():
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[468]..function 
RunTheTest[39]..Test_set_ttytype line 24: set ttytype=xxx did not fail
        From test_startup.vim:
        Found errors in Test_default_term():
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[468]..function 
RunTheTest[39]..Test_default_term line 8: Pattern 'defaulting to ''ansi''' does 
not match 'E437: terminal capability "cm" required\r\nPress ENTER or type 
command to continue\r\r\n'
        From test_termcodes.vim:
        Found errors in Test_list_builtin_terminals():
        Run 1:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[468]..function 
RunTheTest[39]..Test_list_builtin_terminals line 7: Pattern 'builtin_dumb' does 
not match '~\[  occurs 26 times]'
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[468]..function 
RunTheTest[39]..Test_list_builtin_terminals line 8: Pattern 'Not found in 
termcap' does not match ''
        Run 2:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_list_builtin_terminals line 7: Pattern 'builtin_dumb' does 
not match '~\[  occurs 26 times]'
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_list_builtin_terminals line 8: Pattern 'Not found in 
termcap' does not match ''
        Run 3:
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_list_builtin_terminals line 7: Pattern 'builtin_dumb' does 
not match '~\[  occurs 26 times]'
        command line..script 
/usr/local/src/vim/src/testdir/runtest.vim[502]..function 
RunTheTest[39]..Test_list_builtin_terminals line 8: Pattern 'Not found in 
termcap' does not match ''
        Flaky test failed too often, giving up

  TEST FAILURE

Those first failures might be a problem
(Expected {'one': 1, 'two': 2, 'three': 3} but got ''),
but the tty failures look harmless. I think I've seen
them before in tests but not been affected by them.

> Alternatively, you can try running Vim with valgrind, which is
> much slower. Don't use valgrind with a asan build though.
> If you want to run tests with valgrind, you
> can uncomment the following line in vim/src/testdir/Makefile:
> 
> VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=25
> --log-file=valgrind.$*
> 
> I suggest to change it to the following to get even more information
> at the cost of running slower:
> 
> VALGRIND = valgrind --track-origins=yes --leak-check=yes
> --num-callers=40 --log-file=valgrind.$*

Thanks, but the valgrind available via macports only supports macos-10.5
to macos-10.13, and I have 10.14.

Testing doesn't crash if I use macports' openmotif instead of athena,
and only similar tty test failures happen:

  set ttytype=xxx did not fail
  Pattern 'defaulting to ''ansi''' does not match 'E437: terminal capability 
"cm" required
  Pattern 'builtin_dumb' does not match '~

They look harmless.

I'll use the athena version anyway. It'll probably be fine.
And if not, I'll switch to motif.

> Regards
> Dominique

cheers,
raf

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20210101081544.t6zzw7o6inqgphc5%40raf.org.

Raspunde prin e-mail lui