Loading ...
Sorry, an error occurred while loading the content.

54400Re: vim 7.2 compiles fine on MSYS but it doesn't execute

Expand Messages
  • Dominique Pellé
    Jun 7, 2009
    • 0 Attachment
      Cesar Romani wrote:

      > Dominique Pellé wrote:
      ...
      >> When putting a breakpoint at line term.c:1615,
      >> what is the value of 'term' variable? (output of gdb command: print term)
      >>
      >> Ex:
      >>
      >> (gdb) p term
      >> $1 = (char_u *) 0x946e25c "xterm-256color"
      >
      > $1 = (char_u *) 0xa0158c0 "msys"
      >
      >> What is also the value of 'term' later at line 1866 where it crashes?
      >
      > $1 = (char_u *) 0x3a6c3532 <Address 0x3a6c3532 out of bounds>
      >
      >> Output of gdb command "bt full" might also be helpful.
      >
      > --------------------
      > (gdb) bt full
      > #0  0x004fd3a2 in set_termname (
      >    term=0x3a6c3532 <Address 0x3a6c3532 out of bounds>) at term.c:1866
      >        termp = (struct builtin_term *) 0x22f860
      >        builtin_first = 1
      >        try = 2
      >        termcap_cleared = 1
      >        width = 80
      >        height = 25
      >        error_msg = (char_u *) 0x0
      >        bs_p = (char_u *) 0x22f860 ":\017R"
      >        del_p = (char_u *) 0x3a6c3532 <Address 0x3a6c3532 out of bounds>
      > #1  0x3f5b455c in ?? ()
      > No symbol table info available.
      > #2  0x3a6c3532 in ?? ()
      > No symbol table info available.
      > ...
      > #189 0x00000000 in ?? ()
      > No symbol table info available.
      > --------------------

      I can't see any place where 'term' variable would be changed
      other than when it's set to DEFAULT_TERM at line 1816 (but
      that would not cause 'term' pointer to be incorrect).

      So it leaves the possibility of a corrupted stack.

      Can you put intermediate breakpoints (or execute line by line with
      the "next" gdb command if you prefer) between line term.c:1615
      (where 'term' pointer is still OK) and line term.c:1866 where 'term'
      pointer becomes invalid so we can narrow it down? At each steps,
      you can do "print term" in gdb to see when 'term' pointer starts to
      become "out of bounds".



      > If I re-compile with CFLAGS = -g -O0 -Wall, vim executes fine on the
      > console but not on rxvt:
      >
      > --------------------
      > (gdb) run
      > Starting program: C:\msys\1.0\home\Romer\msys\vim72\src/vim.exe
      > [New thread 252.0xe14]
      > Vim: Warning: Output is not to a terminal
      > Vim: Warning: Input is not from a terminal
      > [New thread 252.0xe3c]
      >
      > Program received signal SIGSEGV, Segmentation fault.
      > 0x71084d3a in strcmp () from C:\msys\1.0\bin\msys-1.0.dll
      > --------------------
      >
      > For the console TERM=cygwin and for rxvt TERM=msys

      Ah. So if I understand correctly what you're saying:
      - with -O0, Vim works in the cygwin console, but with -O2 it
      did not work in the cygwin console (correct?)
      - In in rxvt, it still does not work even with -O0. What is the
      stack where it crashes? (output of gdb "backtrace" command).

      Thanks
      -- Dominique

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 15 messages in this topic