rc icon indicating copy to clipboard operation
rc copied to clipboard

Tab completion causes crash.

Open birchb1024 opened this issue 3 years ago • 2 comments

Tab completion causes crash.

How to reproduce

  1. start rc
  2. hit the Tab key
~ $ rc
; free(): double free detected in tcache 2
Aborted

Environment

  • Debian GNU/Linux 11 (bullseye)"
  • package 'rc' 1.7.4
; echo $version
1.7.4 $Release: @(#)rc 1.7.4 (git description unavailable) $
; apt list rc
Listing... Done
rc/stable,now 1.7.4+97.gceb59bb-4 amd64 [installed]

birchb1024 avatar Nov 13 '21 07:11 birchb1024

I can't reproduce this with the current github master on Nix.

It looks like the Debian package is a few years behind upstream and is using an out-of-tree patch that was rejected over what sounds like a similar issue.

RamKromberg avatar May 22 '22 10:05 RamKromberg

I came across this downstream Debian bug and found that the mentioned out-of-tree patch might do the efree(full); twice. I proposed there a fix by setting full to NULL after the first efree call.

bernhardu avatar Jun 04 '22 09:06 bernhardu

The bug was caused and fixed in Debian's patch.

xyb3rt avatar Jun 11 '23 12:06 xyb3rt