Summary: | valgrind warning reading uninitialized part of xEvent when calling XWithdrawWindow (XSendEvent) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | David Baron <dbaron> | ||||||
Component: | Lib/Xlib | Assignee: | Xorg Project Team <xorg-team> | ||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | high | CC: | tilman | ||||||
Version: | unspecified | Keywords: | patch | ||||||
Hardware: | x86 (IA32) | ||||||||
OS: | Linux (All) | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
David Baron
2006-07-31 15:36:40 UTC
Created attachment 8436 [details] [review] patch I tested that this patch fixes the valgrind warnings from Mozilla's session restore dialog in libX11 pulled from git this morning, built with --without-xcb (since xsltproc wouldn't behave during xcb compilation). This also has the added benefit of allowing compressed X connections (i.e. over ssh w/ compression enabled) to more succinctly compress the zero-filled bytes. :-) Yay! JP Created attachment 8796 [details] [review] Maybe nicer patch To make this patch look less like dangerous, we might want to move the memset() to the caller of _XEventToWire(), which is XSendEvent(). Like this. Untested. Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. Fixed in ab0bcd07957cecc8e7c0e75d5160a625e91264fe. I think the prototype of memset is void *memset(void *s, int c, size_t n) So maybe this patch should change to memset (&ev, 0, sizeof(ev)); Man, I suck. I knew that error was in the patch that I attached, but I didn't bother to mention it here since it's so obvious. I also tested the modified version, but when I committed the patch, I grabbed the original from bugzilla. Thanks for spotting that, Jie Luo. Fixed the fix in 0994faa0c76c45b106442db461b8a30a3e1c9395. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.