lichray / nvi2

A multibyte fork of the nvi editor for BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random crashes on OpenBSD

bentley opened this issue · comments

I use this version of nvi exclusively. It is great. But there is a bug somewhere that causes occasional, seemingly random, segfaults on OpenBSD amd64. I haven’t noticed a pattern—it happens with 150000-line assembly files or ten-line emails.

Here is a backtrace from the latest coredump:

#0  seq_find (sp=0x1391dec5ad78, lastqp=0x0, e_input=0x1391e476d000, 
    c_input=0x0, ilen=2, stype=SEQ_INPUT, ispartialp=0x7f7ffffca41c)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/seq.c:236
#1  0x0000138fdc114537 in v_event_get (sp=0x1391eae0f630, argp=0x7f7ffffca880, 
    timeout=600, flags=4)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/key.c:646
#2  0x0000138fdc142c09 in v_txt (sp=0x1391eae0f630, vp=0x7f7ffffcaac0, tm=Variable "tm" is not available.
)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/vi/v_txt.c:480
#3  0x0000138fdc13c867 in v_change (sp=0x1391eae0f630, vp=0x7f7ffffcaac0)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/vi/v_itxt.c:314
#4  0x0000138fdc148531 in vi (spp=0x7f7ffffcacd8)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/vi/vi.c:229
#5  0x0000138fdc11773a in editor (gp=0x1391e76b7000, argc=2, 
    argv=0x7f7ffffcaed0)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/main.c:421
#6  0x0000138fdc10d4d1 in main (argc=2, argv=0x7f7ffffcaec8)
    at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/cl/cl_main.c:120

On Sat, Feb 2, 2013 at 11:18 PM, Anthony J. Bentley <
notifications@github.com> wrote:

Here is a backtrace from the latest coredump:

#0 seq_find (sp=0x1391dec5ad78, lastqp=0x0, e_input=0x1391e476d000,
c_input=0x0, ilen=2, stype=SEQ_INPUT, ispartialp=0x7f7ffffca41c)
at /usr/ports/pobj/nvi-2.1.1-iconv/nvi-2.1.1/common/seq.c:236

Thanks for the backtrack. So you're inputting a key sequence with
a length of 2, and I'm wondering what that this. Can you give me a
list of your mapped keys or a :map list? Thank you.

Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.


4BSD -- http://4bsd.biz/

I don't remember typing any weird keys. Here's the output of :map.

^[OA  k     cursor up
^[OB  j     cursor down
^[OC  l     cursor right
^[OD  h     cursor left
^[OF  $     go to eol
^[OH  ^     go to sol
^[[1;2A     ^U    scroll up
^[[1;2B     ^D    scroll down
^[[2~ i     insert at cursor
^[[3~ x     delete character
^[[5~ ^B    page up
^[[6~ ^F    page down

Here is a mailing list post possibly about the same bug. Starts here:

http://marc.info/?l=openbsd-tech&m=136794306617877&w=2

Most recent patch is in this mail:

http://marc.info/?l=openbsd-tech&m=136838154213955&w=2

On Tue, May 14, 2013 at 12:14 AM, Anthony J. Bentley <
notifications@github.com> wrote:

Here is a mailing list post possibly about the same bug. Starts here:

I... don't think they are the same issue, since the problem shown
in the mailing list is on a higher level of nvi's abstraction. But
thanks for the information. I'd better to subscribe OpenBSD
mailing list as well :)

Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.


4BSD -- http://4bsd.biz/

@bentley Does this issue still happen? If so, is there any pattern of the last key combination you entered and/or in which mode?

Hasn’t happened in recent memory.