winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
705 discussions
Start a n
N
ew thread
Anton Baskanov : quartz: Hold the streaming lock while calling ICDecompressEnd.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: a91a7bf5a7602afa0e735f69782897a497290f25 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a91a7bf5a7602afa0e735f69782897…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Thu May 16 14:17:09 2024 +0700 quartz: Hold the streaming lock while calling ICDecompressEnd. Otherwise, the streaming thread might try to access the decompressor while it's being destroyed. --- dlls/quartz/avidec.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index d7f97e0380c..f494efdf1e8 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -573,10 +573,16 @@ static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface) if (!filter->source.pin.peer) return S_OK; - if (filter->hvid && (res = ICDecompressEnd(filter->hvid))) + if (filter->hvid) { - ERR("ICDecompressEnd() failed, error %Id.\n", res); - return E_FAIL; + EnterCriticalSection(&filter->filter.stream_cs); + res = ICDecompressEnd(filter->hvid); + LeaveCriticalSection(&filter->filter.stream_cs); + if (res) + { + ERR("ICDecompressEnd() failed, error %Id.\n", res); + return E_FAIL; + } } IMemAllocator_Decommit(filter->source.pAllocator);
1
0
0
0
Anton Baskanov : quartz: Use the correct stride when calculating image size in AVIDec.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: e6a6e6545b718de9f04536629b3e58fae0073c68 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e6a6e6545b718de9f04536629b3e58…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Thu May 16 14:14:48 2024 +0700 quartz: Use the correct stride when calculating image size in AVIDec. --- dlls/quartz/avidec.c | 4 ++-- dlls/quartz/tests/avidec.c | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index f020d618fdb..d7f97e0380c 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -361,8 +361,8 @@ static HRESULT avi_decompressor_source_get_media_type(struct strmbase_pin *iface format->bmiHeader.biPlanes = sink_format->bmiHeader.biPlanes; format->bmiHeader.biBitCount = formats[index].bpp; format->bmiHeader.biCompression = formats[index].compression; - format->bmiHeader.biSizeImage = format->bmiHeader.biWidth - * format->bmiHeader.biHeight * formats[index].bpp / 8; + format->bmiHeader.biSizeImage = format->bmiHeader.biHeight * (((format->bmiHeader.biWidth + * formats[index].bpp + 31) / 8) & ~3); if (IsEqualGUID(formats[index].subtype, &MEDIASUBTYPE_RGB565)) { diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 6cb67563bcb..ac3a9abf2b1 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -1313,19 +1313,18 @@ static void test_connect_pin(void) const GUID *subtype; DWORD compression; WORD bpp; - BOOL todo; } expect[9] = { - {&MEDIASUBTYPE_CLJR, mmioFOURCC('C','L','J','R'), 8, TRUE}, - {&MEDIASUBTYPE_UYVY, mmioFOURCC('U','Y','V','Y'), 16, TRUE}, - {&MEDIASUBTYPE_YUY2, mmioFOURCC('Y','U','Y','2'), 16, TRUE}, - {&MEDIASUBTYPE_RGB32, BI_RGB, 32, FALSE}, - {&MEDIASUBTYPE_RGB24, BI_RGB, 24, TRUE}, - {&MEDIASUBTYPE_RGB565, BI_BITFIELDS, 16, TRUE}, - {&MEDIASUBTYPE_RGB555, BI_RGB, 16, TRUE}, - {&MEDIASUBTYPE_RGB8, BI_RGB, 8, TRUE}, - {&MEDIASUBTYPE_I420, mmioFOURCC('I','4','2','0'), 12, FALSE}, + {&MEDIASUBTYPE_CLJR, mmioFOURCC('C','L','J','R'), 8}, + {&MEDIASUBTYPE_UYVY, mmioFOURCC('U','Y','V','Y'), 16}, + {&MEDIASUBTYPE_YUY2, mmioFOURCC('Y','U','Y','2'), 16}, + {&MEDIASUBTYPE_RGB32, BI_RGB, 32}, + {&MEDIASUBTYPE_RGB24, BI_RGB, 24}, + {&MEDIASUBTYPE_RGB565, BI_BITFIELDS, 16}, + {&MEDIASUBTYPE_RGB555, BI_RGB, 16}, + {&MEDIASUBTYPE_RGB8, BI_RGB, 8}, + {&MEDIASUBTYPE_I420, mmioFOURCC('I','4','2','0'), 12}, }; VIDEOINFOHEADER expect_format = @@ -1351,9 +1350,9 @@ static void test_connect_pin(void) hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine_if(expect[i].todo) ok(!memcmp(pmt, &expect_mt, offsetof(AM_MEDIA_TYPE, cbFormat)), + ok(!memcmp(pmt, &expect_mt, offsetof(AM_MEDIA_TYPE, cbFormat)), "%u: Media types didn't match.\n", i); - todo_wine_if(expect[i].todo) ok(!memcmp(pmt->pbFormat, &expect_format, sizeof(VIDEOINFOHEADER)), + ok(!memcmp(pmt->pbFormat, &expect_format, sizeof(VIDEOINFOHEADER)), "%u: Format blocks didn't match.\n", i); if (i == 5) {
1
0
0
0
Anton Baskanov : quartz: Get output format from source, not sink in AVIDec.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: a2996078bf1b4e4f20c26a02011d3cf349765c4b URL:
https://gitlab.winehq.org/wine/wine/-/commit/a2996078bf1b4e4f20c26a02011d3c…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Thu May 16 14:11:24 2024 +0700 quartz: Get output format from source, not sink in AVIDec. --- dlls/quartz/avidec.c | 2 +- dlls/quartz/tests/avidec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 8cc729748c1..f020d618fdb 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -552,7 +552,7 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface) filter->late = -1; - source_format = (VIDEOINFOHEADER *)filter->sink.pin.mt.pbFormat; + source_format = (VIDEOINFOHEADER *)filter->source.pin.mt.pbFormat; if ((res = ICDecompressBegin(filter->hvid, filter->pBihIn, &source_format->bmiHeader))) { ERR("ICDecompressBegin() failed, error %Id.\n", res); diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index aa3aada3acc..6cb67563bcb 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -119,7 +119,7 @@ static LRESULT CALLBACK vfw_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, todo_wine_if (in->biSizeImage != sink_bitmap_info.biSizeImage) ok(!memcmp(in, &sink_bitmap_info, sizeof(BITMAPINFOHEADER)), "Input types didn't match.\n"); - todo_wine ok(!memcmp(out, &source_bitmap_info, sizeof(BITMAPINFOHEADER)), + ok(!memcmp(out, &source_bitmap_info, sizeof(BITMAPINFOHEADER)), "Output types didn't match.\n"); ok(!in_begin, "Got multiple ICM_DECOMPRESS_BEGIN messages.\n"); in_begin = 1;
1
0
0
0
Anton Baskanov : quartz/tests: Use unaligned width in AVIDec tests to expose incorrect stride calculation.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: 5e592a8e74715c8ffbef03493e035fb7b63fa56f URL:
https://gitlab.winehq.org/wine/wine/-/commit/5e592a8e74715c8ffbef03493e035f…
Author: Anton Baskanov <baskanov(a)gmail.com> Date: Tue May 21 13:19:29 2024 +0700 quartz/tests: Use unaligned width in AVIDec tests to expose incorrect stride calculation. --- dlls/quartz/tests/avidec.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index f28dfee7402..aa3aada3acc 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -85,10 +85,10 @@ static LRESULT CALLBACK vfw_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, out->biSize = sizeof(BITMAPINFOHEADER); out->biCompression = mmioFOURCC('I','4','2','0'); - out->biWidth = 32; + out->biWidth = 29; out->biHeight = 24; out->biBitCount = 12; - out->biSizeImage = 32 * 24 * 12 / 8; + out->biSizeImage = 24 * (((29 * 12 + 31) / 8) & ~3); return ICERR_OK; } @@ -159,7 +159,7 @@ static LRESULT CALLBACK vfw_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, for (i = 0; i < 200; ++i) expect[i] = i; ok(!memcmp(params->lpInput, expect, 200), "Data didn't match.\n"); - for (i = 0; i < 32 * 24 * 12 / 8; ++i) + for (i = 0; i < 24 * (((29 * 12 + 31) / 8) & ~3); ++i) output[i] = 111 - i; return ICERR_OK; @@ -876,7 +876,7 @@ static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const A static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample) { struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter); - BYTE *data, expect[32 * 24 * 12 / 8]; + BYTE *data, expect[24 * (((29 * 12 + 31) / 8) & ~3)]; REFERENCE_TIME start, stop; LONG size, i; HRESULT hr; @@ -884,9 +884,9 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample ++filter->got_sample; size = IMediaSample_GetSize(sample); - ok(size == 32 * 24 * 12 / 8, "Got size %lu.\n", size); + ok(size == 24 * (((29 * 12 + 31) / 8) & ~3), "Got size %lu.\n", size); size = IMediaSample_GetActualDataLength(sample); - ok(size == 32 * 24 * 12 / 8, "Got valid size %lu.\n", size); + ok(size == 24 * (((29 * 12 + 31) / 8) & ~3), "Got valid size %lu.\n", size); hr = IMediaSample_GetPointer(sample, &data); ok(hr == S_OK, "Got hr %#lx.\n", hr); @@ -1221,7 +1221,7 @@ static void test_connect_pin(void) { .bmiHeader.biSize = sizeof(BITMAPINFOHEADER), .bmiHeader.biCompression = test_handler, - .bmiHeader.biWidth = 32, + .bmiHeader.biWidth = 29, .bmiHeader.biHeight = 24, .bmiHeader.biBitCount = 16, }; @@ -1313,28 +1313,29 @@ static void test_connect_pin(void) const GUID *subtype; DWORD compression; WORD bpp; + BOOL todo; } expect[9] = { - {&MEDIASUBTYPE_CLJR, mmioFOURCC('C','L','J','R'), 8}, - {&MEDIASUBTYPE_UYVY, mmioFOURCC('U','Y','V','Y'), 16}, - {&MEDIASUBTYPE_YUY2, mmioFOURCC('Y','U','Y','2'), 16}, - {&MEDIASUBTYPE_RGB32, BI_RGB, 32}, - {&MEDIASUBTYPE_RGB24, BI_RGB, 24}, - {&MEDIASUBTYPE_RGB565, BI_BITFIELDS, 16}, - {&MEDIASUBTYPE_RGB555, BI_RGB, 16}, - {&MEDIASUBTYPE_RGB8, BI_RGB, 8}, - {&MEDIASUBTYPE_I420, mmioFOURCC('I','4','2','0'), 12}, + {&MEDIASUBTYPE_CLJR, mmioFOURCC('C','L','J','R'), 8, TRUE}, + {&MEDIASUBTYPE_UYVY, mmioFOURCC('U','Y','V','Y'), 16, TRUE}, + {&MEDIASUBTYPE_YUY2, mmioFOURCC('Y','U','Y','2'), 16, TRUE}, + {&MEDIASUBTYPE_RGB32, BI_RGB, 32, FALSE}, + {&MEDIASUBTYPE_RGB24, BI_RGB, 24, TRUE}, + {&MEDIASUBTYPE_RGB565, BI_BITFIELDS, 16, TRUE}, + {&MEDIASUBTYPE_RGB555, BI_RGB, 16, TRUE}, + {&MEDIASUBTYPE_RGB8, BI_RGB, 8, TRUE}, + {&MEDIASUBTYPE_I420, mmioFOURCC('I','4','2','0'), 12, FALSE}, }; VIDEOINFOHEADER expect_format = { .bmiHeader.biSize = sizeof(BITMAPINFOHEADER), - .bmiHeader.biWidth = 32, + .bmiHeader.biWidth = 29, .bmiHeader.biHeight = 24, .bmiHeader.biBitCount = expect[i].bpp, .bmiHeader.biCompression = expect[i].compression, - .bmiHeader.biSizeImage = 32 * 24 * expect[i].bpp / 8, + .bmiHeader.biSizeImage = 24 * (((29 * expect[i].bpp + 31) / 8) & ~3), }; AM_MEDIA_TYPE expect_mt = @@ -1342,7 +1343,7 @@ static void test_connect_pin(void) .majortype = MEDIATYPE_Video, .subtype = *expect[i].subtype, .bFixedSizeSamples = TRUE, - .lSampleSize = 32 * 24 * expect[i].bpp / 8, + .lSampleSize = 24 * (((29 * expect[i].bpp + 31) / 8) & ~3), .formattype = FORMAT_VideoInfo, .cbFormat = sizeof(VIDEOINFOHEADER), .pbFormat = (BYTE *)&expect_format, @@ -1350,9 +1351,9 @@ static void test_connect_pin(void) hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(!memcmp(pmt, &expect_mt, offsetof(AM_MEDIA_TYPE, cbFormat)), + todo_wine_if(expect[i].todo) ok(!memcmp(pmt, &expect_mt, offsetof(AM_MEDIA_TYPE, cbFormat)), "%u: Media types didn't match.\n", i); - ok(!memcmp(pmt->pbFormat, &expect_format, sizeof(VIDEOINFOHEADER)), + todo_wine_if(expect[i].todo) ok(!memcmp(pmt->pbFormat, &expect_format, sizeof(VIDEOINFOHEADER)), "%u: Format blocks didn't match.\n", i); if (i == 5) {
1
0
0
0
Alexandre Julliard : msvcrt/tests: Use function pointers to bypass builtin malloc/realloc.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: a9689eb62c6bd35aecb00f83216f04fe2ba96c74 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a9689eb62c6bd35aecb00f83216f04…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 22 22:28:33 2024 +0200 msvcrt/tests: Use function pointers to bypass builtin malloc/realloc. --- dlls/msvcrt/tests/heap.c | 50 +++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/dlls/msvcrt/tests/heap.c b/dlls/msvcrt/tests/heap.c index a747482130d..e6de728f2b7 100644 --- a/dlls/msvcrt/tests/heap.c +++ b/dlls/msvcrt/tests/heap.c @@ -467,6 +467,35 @@ static void test_sbheap(void) free(mem); } +static void test_malloc(void) +{ + /* use function pointers to bypass gcc builtins */ + void *(__cdecl *p_malloc)(size_t); + void *(__cdecl *p_realloc)(void *,size_t); + void *mem; + + p_malloc = (void *)GetProcAddress( GetModuleHandleA("msvcrt.dll"), "malloc"); + p_realloc = (void *)GetProcAddress( GetModuleHandleA("msvcrt.dll"), "realloc"); + + mem = p_malloc(0); + ok(mem != NULL, "memory not allocated for size 0\n"); + free(mem); + + mem = p_realloc(NULL, 10); + ok(mem != NULL, "memory not allocated\n"); + + mem = p_realloc(mem, 20); + ok(mem != NULL, "memory not reallocated\n"); + + mem = p_realloc(mem, 0); + ok(mem == NULL, "memory not freed\n"); + + mem = p_realloc(NULL, 0); + ok(mem != NULL, "memory not (re)allocated for size 0\n"); + + free(mem); +} + static void test_calloc(void) { /* use function pointer to bypass gcc builtin */ @@ -496,27 +525,8 @@ static void test_calloc(void) START_TEST(heap) { - void *mem; - - mem = malloc(0); - ok(mem != NULL, "memory not allocated for size 0\n"); - free(mem); - - mem = realloc(NULL, 10); - ok(mem != NULL, "memory not allocated\n"); - - mem = realloc(mem, 20); - ok(mem != NULL, "memory not reallocated\n"); - - mem = realloc(mem, 0); - ok(mem == NULL, "memory not freed\n"); - - mem = realloc(NULL, 0); - ok(mem != NULL, "memory not (re)allocated for size 0\n"); - - free(mem); - test_aligned(); test_sbheap(); + test_malloc(); test_calloc(); }
1
0
0
0
Alexandre Julliard : msvcp: Use RVAs in rtti and exception data on all platforms except i386.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: 44691e8de328c40cd229a7bfe0a051be90623f2c URL:
https://gitlab.winehq.org/wine/wine/-/commit/44691e8de328c40cd229a7bfe0a051…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 22 13:50:48 2024 +0200 msvcp: Use RVAs in rtti and exception data on all platforms except i386. --- dlls/msvcirt/msvcirt.c | 2 +- dlls/msvcp140_1/msvcp140_1.c | 2 +- dlls/msvcp60/ios.c | 2 +- dlls/msvcp90/cxx.h | 2 +- dlls/msvcp90/details.c | 2 +- dlls/msvcp90/exception.c | 2 +- dlls/msvcp90/ios.c | 2 +- dlls/msvcp90/locale.c | 2 +- dlls/msvcp90/misc.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c index 0fcdc52c203..05e3aee4b6a 100644 --- a/dlls/msvcirt/msvcirt.c +++ b/dlls/msvcirt/msvcirt.c @@ -5162,7 +5162,7 @@ static void init_io(void *base) { filebuf *fb; -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_streambuf_rtti(base); init_filebuf_rtti(base); init_strstreambuf_rtti(base); diff --git a/dlls/msvcp140_1/msvcp140_1.c b/dlls/msvcp140_1/msvcp140_1.c index c6a6ff19f13..c9ca98df268 100644 --- a/dlls/msvcp140_1/msvcp140_1.c +++ b/dlls/msvcp140_1/msvcp140_1.c @@ -263,7 +263,7 @@ static BOOL init_cxx_funcs(void) static void init_rtti(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_type_info_rtti(base); init_base_memory_resource_rtti(base); init__Identity_equal_resource_rtti(base); diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c index 3da714375f4..891c126b6be 100644 --- a/dlls/msvcp60/ios.c +++ b/dlls/msvcp60/ios.c @@ -11154,7 +11154,7 @@ void* __thiscall _Winit_op_assign(void *this, void *rhs) void init_io(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_iosb_rtti(base); init_ios_base_rtti(base); init_basic_ios_char_rtti(base); diff --git a/dlls/msvcp90/cxx.h b/dlls/msvcp90/cxx.h index c0b43f78256..8037d7def56 100644 --- a/dlls/msvcp90/cxx.h +++ b/dlls/msvcp90/cxx.h @@ -21,7 +21,7 @@ #include "rtlsupportapi.h" #include "wine/asm.h" -#ifndef __x86_64__ +#ifdef __i386__ #undef RTTI_USE_RVA #else #define RTTI_USE_RVA 1 diff --git a/dlls/msvcp90/details.c b/dlls/msvcp90/details.c index 98579dfa991..984a277ed12 100644 --- a/dlls/msvcp90/details.c +++ b/dlls/msvcp90/details.c @@ -1118,7 +1118,7 @@ __ASM_BLOCK_END void init_concurrency_details(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init__Concurrent_queue_base_v4_rtti(base); init__Runtime_object_rtti(base); #endif diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index 3d569d8d855..5c8e5e85e18 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -1497,7 +1497,7 @@ void DECLSPEC_NORETURN throw_failure(const char *str) void init_exception(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_type_info_rtti(base); init_exception_rtti(base); init_bad_alloc_rtti(base); diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 1240bb537c9..25b5d7fe1a0 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -15837,7 +15837,7 @@ void* __thiscall _Winit_op_assign(void *this, void *rhs) void init_io(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_iosb_rtti(base); init_ios_base_rtti(base); init_basic_ios_char_rtti(base); diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index b6af02dea42..4eaf679139c 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -13336,7 +13336,7 @@ __ASM_BLOCK_END void init_locale(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init__Facet_base_rtti(base); init_locale_facet_rtti(base); init_locale__Locimp_rtti(base); diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index e8998383ecc..a1c9c7f0646 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1781,7 +1781,7 @@ __ASM_BLOCK_END void init_misc(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA #if _MSVCP_VER >= 100 init_error_category_rtti(base); init_generic_category_rtti(base);
1
0
0
0
Alexandre Julliard : msvcrt: Use RVAs in rtti and exception data on all platforms except i386.
by Alexandre Julliard
22 May '24
22 May '24
Module: wine Branch: master Commit: a794b0224e27f91bf0855cd7376d6af3de44523d URL:
https://gitlab.winehq.org/wine/wine/-/commit/a794b0224e27f91bf0855cd7376d6a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 22 13:50:39 2024 +0200 msvcrt: Use RVAs in rtti and exception data on all platforms except i386. --- dlls/concrt140/concrt140.c | 2 +- dlls/concrt140/details.c | 2 +- dlls/msvcr90/tests/msvcr90.c | 10 +++++----- dlls/msvcrt/concurrency.c | 2 +- dlls/msvcrt/cpp.c | 2 +- dlls/msvcrt/cxx.h | 2 +- dlls/msvcrt/msvcrt.h | 3 +-- dlls/msvcrt/tests/cpp.c | 4 ++-- 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dlls/concrt140/concrt140.c b/dlls/concrt140/concrt140.c index 72d8da0dd62..75b4ae24581 100644 --- a/dlls/concrt140/concrt140.c +++ b/dlls/concrt140/concrt140.c @@ -140,7 +140,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) { case DLL_PROCESS_ATTACH: if (!init_cxx_funcs()) return FALSE; -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_exception_rtti((char*)inst); init_range_error_rtti((char*)inst); init_runtime_error_rtti((char*)inst); diff --git a/dlls/concrt140/details.c b/dlls/concrt140/details.c index 978a7a8f96e..a8e7478b9a6 100644 --- a/dlls/concrt140/details.c +++ b/dlls/concrt140/details.c @@ -1100,7 +1100,7 @@ __ASM_BLOCK_END void init_concurrency_details(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init__Concurrent_queue_base_v4_rtti(base); init__Runtime_object_rtti(base); #endif diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c index 0b274fd694f..6a584d81b04 100644 --- a/dlls/msvcr90/tests/msvcr90.c +++ b/dlls/msvcr90/tests/msvcr90.c @@ -234,7 +234,7 @@ typedef struct typedef void (*cxx_copy_ctor)(void); /* complete information about a C++ type */ -#ifndef __x86_64__ +#ifdef __i386__ typedef struct __cxx_type_info { UINT flags; /* flags (see CLASS_* flags below) */ @@ -255,7 +255,7 @@ typedef struct __cxx_type_info #endif /* table of C++ types that apply for a given object */ -#ifndef __x86_64__ +#ifdef __i386__ typedef struct __cxx_type_info_table { UINT count; /* number of types */ @@ -270,7 +270,7 @@ typedef struct __cxx_type_info_table #endif /* type information for an exception object */ -#ifndef __x86_64__ +#ifdef __i386__ typedef struct __cxx_exception_type { UINT flags; /* TYPE_FLAG flags */ @@ -1489,7 +1489,7 @@ static void test_access_s(void) ok(errno == ENOENT, "got %x\n", res); } -#ifndef __x86_64__ +#ifdef __i386__ #define EXCEPTION_REF(instance, name) &instance.name #else #define EXCEPTION_REF(instance, name) FIELD_OFFSET(struct _exception_data, name) @@ -1521,7 +1521,7 @@ static void test_is_exception_typeof(void) int ret; -#ifdef __x86_64__ +#ifndef __i386__ rec.NumberParameters = 4; rec.ExceptionInformation[3] = (ULONG_PTR)&exception_data; #endif diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index f075c685326..39059d66b38 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -3775,7 +3775,7 @@ __ASM_BLOCK_END void msvcrt_init_concurrency(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_cexception_rtti(base); init_improper_lock_rtti(base); init_improper_scheduler_attach_rtti(base); diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 7e0d3f69396..2db4ef32e99 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -573,7 +573,7 @@ DEFINE_CXX_DATA1( bad_alloc, &exception_cxx_type_info, bad_alloc_dtor ) void msvcrt_init_exception(void *base) { -#ifdef __x86_64__ +#ifdef RTTI_USE_RVA init_type_info_rtti(base); init_exception_rtti(base); #if _MSVCR_VER >= 80 diff --git a/dlls/msvcrt/cxx.h b/dlls/msvcrt/cxx.h index c0b43f78256..8037d7def56 100644 --- a/dlls/msvcrt/cxx.h +++ b/dlls/msvcrt/cxx.h @@ -21,7 +21,7 @@ #include "rtlsupportapi.h" #include "wine/asm.h" -#ifndef __x86_64__ +#ifdef __i386__ #undef RTTI_USE_RVA #else #define RTTI_USE_RVA 1 diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index fe626e2e79f..dd7fb5895a0 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -117,11 +117,10 @@ BOOL __cdecl __CxxRegisterExceptionObject(EXCEPTION_POINTERS*, cxx_frame_info*); void __cdecl __CxxUnregisterExceptionObject(cxx_frame_info*, BOOL); void CDECL __DestructExceptionObject(EXCEPTION_RECORD*); -#if defined(__x86_64__) && _MSVCR_VER>=140 void** __cdecl __current_exception(void); int* __cdecl __processing_throw(void); -void __cdecl terminate(void); +#if defined(__x86_64__) && _MSVCR_VER>=140 BOOL msvcrt_init_handler4(void); void msvcrt_attach_handler4(void); void msvcrt_free_handler4(void); diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 29bb126bcda..bfc092e0591 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -869,7 +869,7 @@ static inline void/*rtti_object_locator*/ *get_obj_locator( void *cppobj ) return (void *)vtable[-1]; } -#ifndef __x86_64__ +#ifdef __i386__ #define DEFINE_RTTI_REF(type, name) type *name #define RTTI_REF(instance, name) &instance.name #define RTTI_REF_SIG0(instance, name, base) RTTI_REF(instance, name) @@ -970,7 +970,7 @@ static void test_rtti(void) exception e,b; void *casted; BOOL old_signature; -#ifdef __x86_64__ +#ifndef __i386__ char *base = (char*)GetModuleHandleW(NULL); #endif
1
0
0
0
Esme Povirk : gdiplus: Don't call GetDeviceCaps for NULL dc.
by Alexandre Julliard
21 May '24
21 May '24
Module: wine Branch: master Commit: d41a1f0183f5686fa3ed1b42c4de07e393833925 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d41a1f0183f5686fa3ed1b42c4de07…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Mon May 6 11:52:56 2024 -0500 gdiplus: Don't call GetDeviceCaps for NULL dc. --- dlls/gdiplus/graphics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 58fa129b504..14e09e7cc47 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -519,7 +519,8 @@ static GpStatus alpha_blend_hdc_pixels(GpGraphics *graphics, INT dst_x, INT dst_ if(!hbitmap || !temp_bits) goto done; - if ((GetDeviceCaps(graphics->hdc, TECHNOLOGY) == DT_RASPRINTER && + if ((graphics->hdc && + GetDeviceCaps(graphics->hdc, TECHNOLOGY) == DT_RASPRINTER && GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE) || fmt & PixelFormatPAlpha) memcpy(temp_bits, src, src_width * src_height * 4);
1
0
0
0
Esme Povirk : gdiplus: Do not store HDC on HWND Graphics objects.
by Alexandre Julliard
21 May '24
21 May '24
Module: wine Branch: master Commit: f20a1bb94fd567b39b3cce1a52c88edc7efca811 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f20a1bb94fd567b39b3cce1a52c88e…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Mon May 6 11:47:09 2024 -0500 gdiplus: Do not store HDC on HWND Graphics objects. --- dlls/gdiplus/gdiplus_private.h | 2 +- dlls/gdiplus/graphics.c | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index e25f60de78e..d247b973b3b 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -665,7 +665,7 @@ static inline void image_unlock(GpImage *image) static inline BOOL has_gdi_dc(GpGraphics *graphics) { - return graphics->hdc != NULL; + return graphics->hdc != NULL || graphics->owndc; } static inline void set_rect(GpRectF *rect, REAL x, REAL y, REAL width, REAL height) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index d50379e5943..58fa129b504 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -55,6 +55,14 @@ GpStatus gdi_dc_acquire(GpGraphics *graphics, HDC *hdc) graphics->hdc_refs++; return Ok; } + else if (graphics->owndc) + { + *hdc = graphics->hdc = GetDC(graphics->hwnd); + if (!graphics->hdc) + return OutOfMemory; + graphics->hdc_refs++; + return Ok; + } *hdc = NULL; return InvalidParameter; @@ -64,6 +72,13 @@ void gdi_dc_release(GpGraphics *graphics, HDC hdc) { assert(graphics->hdc_refs > 0); graphics->hdc_refs--; + + if (graphics->owndc && !graphics->hdc_refs) + { + assert(graphics->hdc == hdc); + graphics->hdc = NULL; + ReleaseDC(graphics->hwnd, hdc); + } } static GpStatus draw_driver_string(GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, @@ -2556,6 +2571,9 @@ GpStatus WINGDIPAPI GdipCreateFromHWND(HWND hwnd, GpGraphics **graphics) (*graphics)->hwnd = hwnd; (*graphics)->owndc = TRUE; + ReleaseDC(hwnd, hdc); + (*graphics)->hdc = NULL; + return Ok; } @@ -2610,13 +2628,13 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics) if (graphics->temp_hdc) { - DeleteDC(graphics->temp_hdc); + if (graphics->owndc) + ReleaseDC(graphics->hwnd, graphics->temp_hdc); + else + DeleteDC(graphics->temp_hdc); graphics->temp_hdc = NULL; } - if(graphics->owndc) - ReleaseDC(graphics->hwnd, graphics->hdc); - LIST_FOR_EACH_ENTRY_SAFE(cont, next, &graphics->containers, GraphicsContainerItem, entry){ list_remove(&cont->entry); delete_container(cont); @@ -7002,6 +7020,13 @@ GpStatus WINGDIPAPI GdipGetDC(GpGraphics *graphics, HDC *hdc) { stat = METAFILE_GetDC((GpMetafile*)graphics->image, hdc); } + else if (graphics->owndc) + { + graphics->temp_hdc = GetDC(graphics->hwnd); + if (!graphics->temp_hdc) + return OutOfMemory; + *hdc = graphics->temp_hdc; + } else if (!graphics->hdc || (graphics->image && graphics->image->type == ImageTypeBitmap)) { @@ -7083,6 +7108,11 @@ GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics *graphics, HDC hdc) { stat = METAFILE_ReleaseDC((GpMetafile*)graphics->image, hdc); } + else if (graphics->owndc) + { + ReleaseDC(graphics->hwnd, graphics->temp_hdc); + graphics->temp_hdc = NULL; + } else if (graphics->temp_hdc == hdc) { DWORD* pos;
1
0
0
0
Esme Povirk : gdiplus: Bracket HDC use in gdi_transform_acquire/release.
by Alexandre Julliard
21 May '24
21 May '24
Module: wine Branch: master Commit: 8c04e7c0cceb34241b7276aee358987620d4502f URL:
https://gitlab.winehq.org/wine/wine/-/commit/8c04e7c0cceb34241b7276aee35898…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Sat May 4 21:07:29 2024 +0000 gdiplus: Bracket HDC use in gdi_transform_acquire/release. --- dlls/gdiplus/graphics.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4dd33e5616b..d50379e5943 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -7154,14 +7154,21 @@ GpStatus WINGDIPAPI GdipGetClip(GpGraphics *graphics, GpRegion *region) GpStatus gdi_transform_acquire(GpGraphics *graphics) { - if (graphics->gdi_transform_acquire_count == 0 && graphics->hdc) + if (graphics->gdi_transform_acquire_count == 0 && has_gdi_dc(graphics)) { - graphics->gdi_transform_save = SaveDC(graphics->hdc); - ModifyWorldTransform(graphics->hdc, NULL, MWT_IDENTITY); - SetGraphicsMode(graphics->hdc, GM_COMPATIBLE); - SetMapMode(graphics->hdc, MM_TEXT); - SetWindowOrgEx(graphics->hdc, 0, 0, NULL); - SetViewportOrgEx(graphics->hdc, 0, 0, NULL); + HDC hdc; + GpStatus stat; + + stat = gdi_dc_acquire(graphics, &hdc); + if (stat != Ok) + return stat; + + graphics->gdi_transform_save = SaveDC(hdc); + ModifyWorldTransform(hdc, NULL, MWT_IDENTITY); + SetGraphicsMode(hdc, GM_COMPATIBLE); + SetMapMode(hdc, MM_TEXT); + SetWindowOrgEx(hdc, 0, 0, NULL); + SetViewportOrgEx(hdc, 0, 0, NULL); } graphics->gdi_transform_acquire_count++; return Ok; @@ -7177,6 +7184,7 @@ GpStatus gdi_transform_release(GpGraphics *graphics) if (graphics->gdi_transform_acquire_count == 1 && graphics->hdc) { RestoreDC(graphics->hdc, graphics->gdi_transform_save); + gdi_dc_release(graphics, graphics->hdc); } graphics->gdi_transform_acquire_count--; return Ok;
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200