Opened 3 years ago

Closed 3 years ago

#63011 closed defect (fixed)

neovim: Crash after insert text from system clipboard and exec :checkhealth

Reported by: judaew (Vadym-Valdis Yudaiev) Owned by: l2dy, raimue
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: judaew (Vadym-Valdis Yudaiev), raimue (Rainer Müller)
Port: neovim

Description (last modified by judaew (Vadym-Valdis Yudaiev))

First case

  1. Start Neovim;
  2. Insert text from the system clipboard;
  3. Neovim crashes.

Second case

  1. Start Neovim;
  2. Exec :checkhealth;
  3. Neovim crashes.

Version port: 0.4.4_2 (commit 31d794196a00d287c0e2c4b11745a8eae4d0ea73) Terminal: kitty 0.20.3

Attachments (1)

nvim.log (16.4 KB) - added by judaew (Vadym-Valdis Yudaiev) 3 years ago.
nvim.log

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Description: modified (diff)
Port: neovim added

Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Attachment: nvim.log added

nvim.log

comment:2 Changed 3 years ago by raimue (Rainer Müller)

Cc: raimue added
Owner: changed from raimue to l2dy, raimue

@l2dy Sorry for assigning this one back to you as it must have been caused by macports-ports#11168. I can't look into this at the moment.

I know there had been problems with lua vs. luajit in the neovim port before... but can't remember any details.

comment:3 Changed 3 years ago by reneeotten (Renee Otten)

Priority: HighNormal

comment:4 Changed 3 years ago by l2dy (Zero King)

Try port deactivate luajit and then port install luajit-openresty, this should fix it.

I'm looking into this.

comment:5 Changed 3 years ago by l2dy (Zero King)

Looks like the luajit port we have is problematic, but luajit-openresty is not (it does not crash with ASan).

Port luajit:

$ luajit
=================================================================
==77165==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000102721fa7 at pc 0x00010260f13b bp 0x7ffeed5fd540 sp 0x7ffeed5fd538
READ of size 4 at 0x000102721fa7 thread T0
    #0 0x10260f13a in lj_str_new lj_str.c:155

0x000102721fa7 is located 57 bytes to the left of global variable '<string literal>' defined in './lib_base.c:655:6' (0x102721fe0) of size 3
  '<string literal>' is ascii string 'kv'
0x000102721fa7 is located 0 bytes to the right of global variable '<string literal>' defined in './lib_base.c:654:34' (0x102721fa0) of size 7
  '<string literal>' is ascii string '__mode'
SUMMARY: AddressSanitizer: global-buffer-overflow lj_str.c:155 in lj_str_new
Shadow bytes around the buggy address:
  0x1000204e43a0: 00 00 04 f9 f9 f9 f9 f9 05 f9 f9 f9 f9 f9 f9 f9
  0x1000204e43b0: 06 f9 f9 f9 f9 f9 f9 f9 00 02 f9 f9 f9 f9 f9 f9
  0x1000204e43c0: 00 00 04 f9 f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9
  0x1000204e43d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000204e43e0: 07 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 06 f9 f9
=>0x1000204e43f0: f9 f9 f9 f9[07]f9 f9 f9 f9 f9 f9 f9 03 f9 f9 f9
  0x1000204e4400: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 02
  0x1000204e4410: f9 f9 f9 f9 00 00 00 00 00 00 00 00 03 f9 f9 f9
  0x1000204e4420: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 02 f9 f9
  0x1000204e4430: f9 f9 f9 f9 05 f9 f9 f9 f9 f9 f9 f9 07 f9 f9 f9
  0x1000204e4440: f9 f9 f9 f9 00 00 02 f9 f9 f9 f9 f9 04 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==77165==ABORTING

Port luajit-openresty:

$ luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2021 Mike Pall. https://luajit.org/
JIT: ON SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse
>

comment:6 Changed 3 years ago by l2dy (Zero King)

In f9b0ad870321edb15668d8b661db68e32465a33d/macports-ports (master):

luajit: use latest commit

See: #63011

comment:7 Changed 3 years ago by judaew (Vadym-Valdis Yudaiev)

Thank you, luajit-openresty or luajit 2.1.0-beta3 to fix this issue. You can close the ticket.

Last edited 3 years ago by judaew (Vadym-Valdis Yudaiev) (previous) (diff)

comment:8 Changed 3 years ago by l2dy (Zero King)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.