valgrind detects uninitialized memory usage
1ndahous3 opened this issue · 2 comments
1ndahous3 commented
STR: run under valgrind, open bottom context menu.
$ sudo valgrind ./gf2
==31887== Memcheck, a memory error detector
==31887== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==31887== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==31887== Command: ./gf2
==31887==
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 28 2022 11:20:41)
Unknown option argument: "--servername"
More info with: "vim -h"
==31887== Syscall param writev(vector[...]) points to uninitialised byte(s)
==31887== at 0x4ABB4AD: __writev (writev.c:26)
==31887== by 0x4ABB4AD: writev (writev.c:24)
==31887== by 0x4BADFB8: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==31887== by 0x4BAE380: xcb_writev (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==31887== by 0x48A6D1D: _XSend (in /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0)
==31887== by 0x48A6E68: _XEventsQueued (in /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0)
==31887== by 0x48987C0: XPending (in /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0)
==31887== by 0x11AEFB: _UIMessageLoopSingle (luigi.h:5306)
==31887== by 0x11B833: UIMessageLoop (luigi.h:4675)
==31887== by 0x10B956: main (gf2.cpp:1583)
==31887== Address 0x4e13f30 is 96 bytes inside a block of size 16,384 alloc'd
==31887== at 0x48445EF: calloc (vg_replace_malloc.c:1328)
==31887== by 0x4896BD9: XOpenDisplay (in /usr/lib/x86_64-linux-gnu/libX11.so.6.4.0)
==31887== by 0x118D49: UIInitialise (luigi.h:4878)
==31887== by 0x10B82E: main (gf2.cpp:1541)
==31887==
nakst commented
It looks to me like this is an issue with libX11. I cannot reproduce it on my computer. Perhaps it only occurs when running specific window managers.
aolo2 commented
This happens specifically when pressing the "Menu" button. I was able to reproduce it under XWayland and openbox.