src/Makefile, disable the the GUI and window-x CONF_OPT_GUI = --disable-gui and CONF_OPT_X = --without-xCFLAGS = -g3 -fsanitize=address -fno-common -fno-omit-frame-pointer -fPIC LDFLAGS = -g3 -fsanitize=address -fno-common -fno-omit-frame-pointer -fPIC
make reconfigsrc/testdir and trigger the ASAN LeakSanitizer by testing for test_options.vim:# at src/testdir $ VIMRUNTIME=../../runtime ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -S runtest.vim test_options.vim --cmd 'au SwapExists * let v:swapchoice = "e"' | LC_ALL=C LANG=C LANGUAGE=C awk '/Executing Test_/{match($0, "Executing Test_[^\\)]*\\)"); print substr($0, RSTART, RLENGTH) "\r"; fflush()}'
Expected no memory leak, instead get ASAN memory leak error:
# for test_options.vim
=================================================================
==138337==ERROR: LeakSanitizer: detected memory leaks8.2.4407
OS: Linux Mint 20.3 (Una)
Terminal: xfce4-terminal 0.8.10
$TERM: xterm-256color
Shell: /bin/bash
================================================================= ==138408==ERROR: LeakSanitizer: detected memory leaks Direct leak of 560 byte(s) in 2 object(s) allocated from: #0 0x4993e2 in calloc (src/vim+0x4993e2) #1 0x7f5d582a9db7 in _nc_setupterm (/lib/x86_64-linux-gnu/libtinfo.so.6+0x13db7) Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x485614 in strdup (src/vim+0x485614) #1 0x7f5d582b14f7 in _nc_trim_sgr0 (/lib/x86_64-linux-gnu/libtinfo.so.6+0x1b4f7) Indirect leak of 7988 byte(s) in 6 object(s) allocated from: #0 0x499589 in realloc (src/vim+0x499589) #1 0x7f5d582a72c7 in _nc_doalloc (/lib/x86_64-linux-gnu/libtinfo.so.6+0x112c7) Indirect leak of 7584 byte(s) in 2 object(s) allocated from: #0 0x49926d in malloc (src/vim+0x49926d) #1 0x7f5d582a51af (/lib/x86_64-linux-gnu/libtinfo.so.6+0xf1af) Indirect leak of 3042 byte(s) in 2 object(s) allocated from: #0 0x49926d in malloc (src/vim+0x49926d) #1 0x7f5d582afe82 in _nc_read_termtype (/lib/x86_64-linux-gnu/libtinfo.so.6+0x19e82) Indirect leak of 1510 byte(s) in 2 object(s) allocated from: #0 0x49926d in malloc (src/vim+0x49926d) #1 0x7f5d582b080b in _nc_read_termtype (/lib/x86_64-linux-gnu/libtinfo.so.6+0x1a80b) Indirect leak of 992 byte(s) in 2 object(s) allocated from: #0 0x4993e2 in calloc (src/vim+0x4993e2) #1 0x7f5d582b078b in _nc_read_termtype (/lib/x86_64-linux-gnu/libtinfo.so.6+0x1a78b) Indirect leak of 992 byte(s) in 2 object(s) allocated from: #0 0x49926d in malloc (src/vim+0x49926d) #1 0x7f5d582a52d9 (/lib/x86_64-linux-gnu/libtinfo.so.6+0xf2d9) Indirect leak of 156 byte(s) in 2 object(s) allocated from: #0 0x49926d in malloc (src/vim+0x49926d) #1 0x7f5d582a51ff (/lib/x86_64-linux-gnu/libtinfo.so.6+0xf1ff) Indirect leak of 92 byte(s) in 2 object(s) allocated from: #0 0x49926d in malloc (src/vim+0x49926d) #1 0x7f5d582a518e (/lib/x86_64-linux-gnu/libtinfo.so.6+0xf18e) Indirect leak of 21 byte(s) in 2 object(s) allocated from: #0 0x485614 in strdup (src/vim+0x485614) #1 0x7f5d582a9e4f in _nc_setupterm (/lib/x86_64-linux-gnu/libtinfo.so.6+0x13e4f) SUMMARY: AddressSanitizer: 22945 byte(s) leaked in 25 allocation(s).
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Those leaks do come not from Vim, but some other libraries. In the CI, libtinfo is ignored when detecting leaks
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Closed #9921.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
i see. Thank you for the information!
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()