On Sun Oct 27 18:10:54 2024 +0000, Alanas wrote:
note: all code blocks are links in this reply I'm trying to understand how test code works. I found:<ul><li><a href="https://gitlab.winehq.org/wine/wine/-/blob/3a736901cdd588ba7fbb4318e5f5069793268a01/dlls/comctl32/tests/toolbar.c#L2750-2752"><pre><code lang="c"> HWND hwnd; rebuild_toolbar(&hwnd);</code></pre></a></li><li><a href="https://gitlab.winehq.org/wine/wine/-/blob/3a736901cdd588ba7fbb4318e5f5069793268a01/dlls/comctl32/tests/toolbar.c#L515-518"><pre><code lang="c">static void rebuild_toolbar(HWND *hToolbar) { rebuild_toolbar_ex(hToolbar, 0); }</code></pre></a></li><li><a href="https://gitlab.winehq.org/wine/wine/-/blob/3a736901cdd588ba7fbb4318e5f5069793268a01/dlls/comctl32/tests/toolbar.c#L503-505"><pre><code lang="c">static void rebuild_toolbar_ex(HWND *hToolbar, DWORD exstyle) { if (*hToolbar)</code></pre></a></li></ul>Why is this code checking is uninitialized <code lang="c">sizeof(HWND)</code> bytes of stack memory all zeroes?
That's a bug that we'll need to patch. First time it's called it's meant to get a null handle, so local variable is missing initializer here.