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

Segfault when using the ex append command

Expand Messages
  • Georg Neis
    ... I can reproduce this here (in almost-2.2.1): Program received signal SIGSEGV, Segmentation fault. 0x08079951 in parse (win=0x80c8db0, refp=0xbffff40c,
    Message 1 of 2 , Dec 7, 2004
      > * dmt00000 <dmt00000@...> [2004-12-07 02:20]:
      > > I've got my plain x86 elvis binary seg faulting when I enter a blank
      > > line immediately after an ex-mode append command. If I enter anything
      > > other than a single CR on the first line of the append mode, it seems
      > > fine.

      I can reproduce this here (in almost-2.2.1):

      Program received signal SIGSEGV, Segmentation fault.
      0x08079951 in parse (win=0x80c8db0, refp=0xbffff40c, xinf=0xbffff410) at ex.c:2617
      2617 xinf->rhs[i - 1] = '\0';
      (gdb) p xinf->rhs
      $1 = (CHAR *) 0x0
      (gdb) p i
      $2 = 0
      (gdb) list
      2612
      2613 /* if all went well, then strip the "." from the end */
      2614 if (*refp)
      2615 {
      2616 assert(i > 2);
      2617 xinf->rhs[i - 1] = '\0';
      2618 }
      2619 else if (markbuffer(&orig) != NULL) /* not scanning string */
      2620 {
      2621 /* end not found, need more text */
      (gdb) bt
      #0 0x08079951 in parse (win=0x80c8db0, refp=0xbffff40c, xinf=0xbffff410) at ex.c:2617
      #1 0x0807a977 in experform (win=0x80c8db0, top=0x80cb500, bottom=0x80cb510) at ex.c:3015
      #2 0x0807ad22 in exenter (win=0xbffff40c) at ex.c:3178
      #3 0x08097ffb in statekey (key=13) at state.c:296
      #4 0x08089ef4 in mapdo (keys=0xbffff5d1 "öÿ¿ôõÿ¿Ê\203\005@", nkeys=13) at map.c:520
      #5 0x080a3481 in loop () at guitcap.c:1497
      #6 0x0804ab73 in main (argc=0, argv=0x0) at main.c:921

      If I #undef NDEBUG, the assertion in line 2616 fails of course.

      Bye!
      Georg
    Your message has been successfully submitted and would be delivered to recipients shortly.