79456: [PATCH 2/2] mmdevapi: Don't use invalid This pointer on static object

buildbot at kegel.com buildbot at kegel.com
Fri Sep 30 10:37:28 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

For more info about this message, see http://wiki.winehq.org/BuildBot

The Buildbot has detected a failed build on builder runtests-default-x86_64 while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-default-x86_64/builds/37 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed shell_3

Errors:
alarum: failed command was ../../../wine jscript_test.exe.so activex.c 
alarum: ../../../wine terminated abnormally
make: *** [activex.ok] Error 99

-------------- next part --------------
From: Andrew Eikum <aeikum at codeweavers.com>
Subject: [PATCH 1/2] winealsa.drv: Fix default device creation logic
Message-Id: <20110930133426.GA32548 at foghorn.codeweavers.com>
Date: Fri, 30 Sep 2011 08:34:26 -0500

---
 dlls/winealsa.drv/mmdevdrv.c |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index e1f1a49..262942f 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -294,8 +294,7 @@ static BOOL alsa_try_open(const char *devnode, snd_pcm_stream_t stream)
 }
 
 static HRESULT alsa_get_card_devices(snd_pcm_stream_t stream, WCHAR **ids, char **keys,
-        UINT *num, snd_ctl_t *ctl, int card, const WCHAR *cardnameW,
-        BOOL count_failed)
+        UINT *num, snd_ctl_t *ctl, int card, const WCHAR *cardnameW)
 {
     static const WCHAR dashW[] = {' ','-',' ',0};
     int err, device;
@@ -327,11 +326,8 @@ static HRESULT alsa_get_card_devices(snd_pcm_stream_t stream, WCHAR **ids, char
         }
 
         sprintf(devnode, "plughw:%d,%d", card, device);
-        if(!alsa_try_open(devnode, stream)){
-            if(count_failed)
-                ++(*num);
+        if(!alsa_try_open(devnode, stream))
             continue;
-        }
 
         if(ids && keys){
             DWORD len, cardlen;
@@ -380,7 +376,7 @@ static HRESULT alsa_get_card_devices(snd_pcm_stream_t stream, WCHAR **ids, char
 }
 
 static HRESULT alsa_enum_devices(EDataFlow flow, WCHAR **ids, char **keys,
-        UINT *num, BOOL count_failed)
+        UINT *num)
 {
     snd_pcm_stream_t stream = (flow == eRender ? SND_PCM_STREAM_PLAYBACK :
         SND_PCM_STREAM_CAPTURE);
@@ -397,8 +393,7 @@ static HRESULT alsa_enum_devices(EDataFlow flow, WCHAR **ids, char **keys,
             memcpy(*keys, defname, sizeof(defname));
         }
         ++*num;
-    }else if(count_failed)
-        ++*num;
+    }
 
     for(err = snd_card_next(&card); card != -1 && err >= 0;
             err = snd_card_next(&card)){
@@ -431,8 +426,7 @@ static HRESULT alsa_enum_devices(EDataFlow flow, WCHAR **ids, char **keys,
         }
         MultiByteToWideChar(CP_UNIXCP, 0, cardname, -1, cardnameW, len);
 
-        alsa_get_card_devices(stream, ids, keys, num, ctl, card, cardnameW,
-                count_failed);
+        alsa_get_card_devices(stream, ids, keys, num, ctl, card, cardnameW);
 
         HeapFree(GetProcessHeap(), 0, cardnameW);
 
@@ -453,7 +447,7 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, char ***keys,
 
     TRACE("%d %p %p %p %p\n", flow, ids, keys, num, def_index);
 
-    hr = alsa_enum_devices(flow, NULL, NULL, num, TRUE);
+    hr = alsa_enum_devices(flow, NULL, NULL, num);
     if(FAILED(hr))
         return hr;
 
@@ -474,7 +468,7 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, char ***keys,
 
     *def_index = 0;
 
-    hr = alsa_enum_devices(flow, *ids, *keys, num, FALSE);
+    hr = alsa_enum_devices(flow, *ids, *keys, num);
     if(FAILED(hr)){
         int i;
         for(i = 0; i < *num; ++i){

From: Andrew Eikum <aeikum at codeweavers.com>
Subject: [PATCH 2/2] mmdevapi: Don't use invalid This pointer on static object
Message-Id: <20110930133520.GB32548 at foghorn.codeweavers.com>
Date: Fri, 30 Sep 2011 08:35:20 -0500

---

Fixes 28415

 dlls/mmdevapi/devenum.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c
index bedd2e4..6b6cfb6 100644
--- a/dlls/mmdevapi/devenum.c
+++ b/dlls/mmdevapi/devenum.c
@@ -1236,14 +1236,10 @@ static ULONG WINAPI info_device_ps_Release(IPropertyStore *iface)
 static HRESULT WINAPI info_device_ps_GetValue(IPropertyStore *iface,
         REFPROPERTYKEY key, PROPVARIANT *pv)
 {
-    MMDevPropStore *This = impl_from_IPropertyStore(iface);
-    TRACE("(%p)->(\"%s,%u\", %p)\n", This, debugstr_guid(&key->fmtid), key ? key->pid : 0, pv);
+    TRACE("(static)->(\"%s,%u\", %p)\n", debugstr_guid(&key->fmtid), key ? key->pid : 0, pv);
 
     if (!key || !pv)
         return E_POINTER;
-    if (This->access != STGM_READ
-        && This->access != STGM_READWRITE)
-        return STG_E_ACCESSDENIED;
 
     if (IsEqualPropertyKey(*key, DEVPKEY_Device_Driver))
     {



More information about the wine-tests-results mailing list