On Mon, Feb 24, 2020 at 04:37:00PM -0500, Scott Kostyshak wrote: > On Mon, Feb 24, 2020 at 09:56:41PM +0100, Enrico Forestieri wrote: > > On Mon, Feb 24, 2020 at 02:02:32PM -0500, Scott Kostyshak wrote: > > > On Mon, Feb 24, 2020 at 06:39:25PM +0100, Enrico Forestieri wrote: > > > > On Mon, Feb 24, 2020 at 11:05:51AM -0500, Scott Kostyshak wrote: > > > > > > > > > > Apparently another approach would be to add the following: > > > > > > > > > > memset(&padded_event, 0, sizeof(padded_event)); > > > > > > > > > > Valgrind does not complain when this line is added to the union patch. > > > > > > > > I am baffled. The last suggestion I have is trying > > > > > > > > alignas(32) xcb_selection_notify_event_t nev = {0}; > > > > > > Valgrind still gives the error. I attach the full Valgrind log. > > > > Sigh. The final attempt would be doing the same as it is done in Qt: > > > > struct alignas(32) padded_event > > : xcb_selection_notify_event_t {}; > > padded_event nev = {}; > > > > If also this fails, I give up. > > It works! Please commit since I have no idea what is going on in this > patch. In case it saves you time, attached is the diff and here's a > commit message you can correct: > > Cleaner fix to ensure 32-bit XCB events > > This fix still satisfies Valgrind and is cleaner than the approach > at 19c41bd0: instead of using calloc we now use the C++11 specifier > alignas. For more info, see the following ML thread: > > > https://www.mail-archive.com/search?l=mid&q=20200219024908.5n4x4osni55gylo3%40tallinn > > Thanks for the patch. Although this was frustrating for you, the > non-valgrind-waiting part was fun for me since I got to learn a little > bit more about memory and initialization.
Done, thank you. -- Enrico -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel