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
November 2022
----- 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
1171 discussions
Start a n
N
ew thread
Rémi Bernon : ntdll: Introduce a new heap block_set_flags helper.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: d9313b4e9e017af592d93b8efbf5986331316498 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d9313b4e9e017af592d93b8efbf598…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Oct 13 15:51:11 2022 +0200 ntdll: Introduce a new heap block_set_flags helper. To clear and set block flags independently of the block size. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53741
--- dlls/ntdll/heap.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 8530bdf223f..3258dd2e4f4 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -256,12 +256,19 @@ static inline UINT block_get_size( const struct block *block ) return block_size * ALIGNMENT; } -static inline void block_set_size( struct block *block, UINT block_flags, UINT block_size ) +static inline void block_set_size( struct block *block, UINT block_size ) { block_size /= ALIGNMENT; - if (block_flags & BLOCK_FLAG_FREE) block->tail_size = block_size >> 16; + if (block_get_flags( block ) & BLOCK_FLAG_FREE) block->tail_size = block_size >> 16; block->block_size = block_size; - block->block_flags = block_flags; +} + +static inline void block_set_flags( struct block *block, BYTE clear, BYTE set ) +{ + UINT block_size = block_get_size( block ); + block->block_flags &= ~clear; + block->block_flags |= set; + block_set_size( block, block_size ); } static inline void *subheap_base( const SUBHEAP *subheap ) @@ -682,7 +689,8 @@ static void create_free_block( struct heap *heap, SUBHEAP *subheap, struct block valgrind_make_writable( block, sizeof(*entry) ); block_set_type( block, ARENA_FREE_MAGIC ); - block_set_size( block, BLOCK_FLAG_FREE, block_size ); + block_set_flags( block, ~0, BLOCK_FLAG_FREE ); + block_set_size( block, block_size ); /* If debugging, erase the freed block content */ @@ -695,14 +703,14 @@ static void create_free_block( struct heap *heap, SUBHEAP *subheap, struct block struct entry *next_entry = (struct entry *)next; list_remove( &next_entry->entry ); block_size += block_get_size( next ); - block_set_size( block, BLOCK_FLAG_FREE, block_size ); + block_set_size( block, block_size ); mark_block_free( next_entry, sizeof(*next_entry), flags ); } if ((next = next_block( subheap, block ))) { /* set the next block PREV_FREE flag and back pointer */ - block_set_size( next, BLOCK_FLAG_PREV_FREE, block_get_size( next ) ); + block_set_flags( next, 0, BLOCK_FLAG_PREV_FREE ); valgrind_make_writable( (struct block **)next - 1, sizeof(struct block *) ); *((struct block **)next - 1) = block; } @@ -760,21 +768,21 @@ static void free_used_block( struct heap *heap, SUBHEAP *subheap, struct block * } -static inline void shrink_used_block( struct heap *heap, SUBHEAP *subheap, struct block *block, UINT flags, +static inline void shrink_used_block( struct heap *heap, SUBHEAP *subheap, struct block *block, SIZE_T old_block_size, SIZE_T block_size, SIZE_T size ) { if (old_block_size >= block_size + HEAP_MIN_BLOCK_SIZE) { - block_set_size( block, flags, block_size ); + block_set_size( block, block_size ); block->tail_size = block_size - sizeof(*block) - size; create_free_block( heap, subheap, next_block( subheap, block ), old_block_size - block_size ); } else { struct block *next; - block_set_size( block, flags, old_block_size ); + block_set_size( block, old_block_size ); block->tail_size = old_block_size - sizeof(*block) - size; - if ((next = next_block( subheap, block ))) next->block_flags &= ~BLOCK_FLAG_PREV_FREE; + if ((next = next_block( subheap, block ))) block_set_flags( next, BLOCK_FLAG_PREV_FREE, 0 ); } } @@ -804,7 +812,8 @@ static struct block *allocate_large_block( struct heap *heap, DWORD flags, SIZE_ arena->block_size = (char *)address + total_size - (char *)block; block_set_type( block, ARENA_LARGE_MAGIC ); - block_set_size( block, BLOCK_FLAG_LARGE, 0 ); + block_set_flags( block, ~0, BLOCK_FLAG_LARGE ); + block_set_size( block, 0 ); list_add_tail( &heap->large_list, &arena->entry ); valgrind_make_noaccess( (char *)block + sizeof(*block) + arena->data_size, arena->block_size - sizeof(*block) - arena->data_size ); @@ -968,7 +977,8 @@ static SUBHEAP *HEAP_CreateSubHeap( struct heap **heap_ptr, LPVOID address, DWOR list_init( &heap->free_lists[0].entry ); for (i = 0, pEntry = heap->free_lists; i < HEAP_NB_FREE_LISTS; i++, pEntry++) { - block_set_size( &pEntry->block, BLOCK_FLAG_FREE_LINK, 0 ); + block_set_flags( &pEntry->block, ~0, BLOCK_FLAG_FREE_LINK ); + block_set_size( &pEntry->block, 0 ); block_set_type( &pEntry->block, ARENA_FREE_MAGIC ); if (i) list_add_after( &pEntry[-1].entry, &pEntry->entry ); } @@ -1510,7 +1520,8 @@ static NTSTATUS heap_allocate( struct heap *heap, ULONG flags, SIZE_T size, void old_block_size = block_get_size( block ); block_set_type( block, ARENA_INUSE_MAGIC ); - shrink_used_block( heap, subheap, block, 0, old_block_size, block_size, size ); + block_set_flags( block, ~0, 0 ); + shrink_used_block( heap, subheap, block, old_block_size, block_size, size ); initialize_block( block + 1, size, flags ); mark_block_tail( block, flags ); @@ -1632,7 +1643,7 @@ static NTSTATUS heap_reallocate( struct heap *heap, ULONG flags, void *ptr, SIZE } valgrind_notify_resize( block + 1, old_size, size ); - shrink_used_block( heap, subheap, block, block_get_flags( block ), old_block_size, block_size, size ); + shrink_used_block( heap, subheap, block, old_block_size, block_size, size ); if (size > old_size) initialize_block( (char *)(block + 1) + old_size, size - old_size, flags ); mark_block_tail( block, flags );
1
0
0
0
Rémi Bernon : kernel32/tests: Test (Global|Local)Handle with heap allocated pointers.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: d99e9da90ea338f52097dd1cb7881dffda953093 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d99e9da90ea338f52097dd1cb7881d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Oct 13 15:37:18 2022 +0200 kernel32/tests: Test (Global|Local)Handle with heap allocated pointers. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53741
--- dlls/kernel32/tests/heap.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index 309274a66bf..526a898209d 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -1813,6 +1813,23 @@ static void test_GlobalAlloc(void) mem = GlobalFree( mem ); ok( !mem, "GlobalFree failed, error %lu\n", GetLastError() ); } + + ptr = HeapAlloc( GetProcessHeap(), 0, 16 ); + ok( !!ptr, "HeapAlloc failed, error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + tmp_mem = GlobalHandle( ptr ); + ok( !!tmp_mem, "GlobalHandle failed, error %lu\n", GetLastError() ); + todo_wine + ok( tmp_mem == ptr, "GlobalHandle returned unexpected handle\n" ); + tmp_ptr = (void *)0xdeadbeef; + tmp_flags = 0xdeadbeef; + ret = pRtlGetUserInfoHeap( GetProcessHeap(), 0, ptr, (void **)&tmp_ptr, &tmp_flags ); + ok( ret, "RtlGetUserInfoHeap failed, error %lu\n", GetLastError() ); + todo_wine + ok( tmp_ptr == (void *)0xdeadbeef, "got user value %p\n", tmp_ptr ); + ok( tmp_flags == 0, "got user flags %#lx\n", tmp_flags ); + ret = HeapFree( GetProcessHeap(), 0, ptr ); + ok( ret, "HeapFree failed, error %lu\n", GetLastError() ); } static void test_LocalAlloc(void) @@ -1833,6 +1850,7 @@ static void test_LocalAlloc(void) HLOCAL locals[0x10000]; HLOCAL mem, tmp_mem; BYTE *ptr, *tmp_ptr; + ULONG tmp_flags; UINT i, flags; SIZE_T size; BOOL ret; @@ -2162,6 +2180,23 @@ static void test_LocalAlloc(void) mem = LocalFree( mem ); ok( !mem, "LocalFree failed, error %lu\n", GetLastError() ); } + + ptr = HeapAlloc( GetProcessHeap(), 0, 16 ); + ok( !!ptr, "HeapAlloc failed, error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + tmp_mem = LocalHandle( ptr ); + ok( !!tmp_mem, "LocalHandle failed, error %lu\n", GetLastError() ); + todo_wine + ok( tmp_mem == ptr, "LocalHandle returned unexpected handle\n" ); + tmp_ptr = (void *)0xdeadbeef; + tmp_flags = 0xdeadbeef; + ret = pRtlGetUserInfoHeap( GetProcessHeap(), 0, ptr, (void **)&tmp_ptr, &tmp_flags ); + ok( ret, "RtlGetUserInfoHeap failed, error %lu\n", GetLastError() ); + todo_wine + ok( tmp_ptr == (void *)0xdeadbeef, "got user value %p\n", tmp_ptr ); + ok( tmp_flags == 0, "got user flags %#lx\n", tmp_flags ); + ret = HeapFree( GetProcessHeap(), 0, ptr ); + ok( ret, "HeapFree failed, error %lu\n", GetLastError() ); } static void test_block_layout( HANDLE heap, DWORD global_flags, DWORD heap_flags, DWORD alloc_flags )
1
0
0
0
Rémi Bernon : kernel32/tests: Test more Global/Local functions with invalid pointers.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: 5c928bc0ef27ee28d232d98156e9792ce8bee721 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5c928bc0ef27ee28d232d98156e979…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Nov 9 14:21:40 2022 +0100 kernel32/tests: Test more Global/Local functions with invalid pointers. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53741
--- dlls/kernel32/tests/heap.c | 109 ++++++++++++++++++++++++++++++++------------- 1 file changed, 79 insertions(+), 30 deletions(-) diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index 83daa4dafa1..309274a66bf 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -241,34 +241,36 @@ static void test_HeapCreate(void) ok( ret, "HeapFree failed, error %lu\n", GetLastError() ); ret = HeapFree( heap, 0, NULL ); ok( ret, "HeapFree failed, error %lu\n", GetLastError() ); -#if 0 /* crashes */ - SetLastError( 0xdeadbeef ); - ret = HeapFree( heap, 0, (void *)0xdeadbe00 ); - ok( !ret, "HeapFree succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ptr = (BYTE *)((UINT_PTR)buffer & ~63) + 64; - ret = HeapFree( heap, 0, ptr ); - ok( !ret, "HeapFree succeeded\n" ); - ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); -#endif + if (0) /* crashes */ + { + SetLastError( 0xdeadbeef ); + ret = HeapFree( heap, 0, (void *)0xdeadbe00 ); + ok( !ret, "HeapFree succeeded\n" ); + ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + ptr = (BYTE *)((UINT_PTR)buffer & ~63) + 64; + ret = HeapFree( heap, 0, ptr ); + ok( !ret, "HeapFree succeeded\n" ); + ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); + } SetLastError( 0xdeadbeef ); ptr = HeapReAlloc( heap, 0, NULL, 1 ); ok( !ptr, "HeapReAlloc succeeded\n" ); todo_wine ok( GetLastError() == NO_ERROR, "got error %lu\n", GetLastError() ); -#if 0 /* crashes */ - SetLastError( 0xdeadbeef ); - ptr1 = HeapReAlloc( heap, 0, (void *)0xdeadbe00, 1 ); - ok( !ptr1, "HeapReAlloc succeeded\n" ); - ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); - SetLastError( 0xdeadbeef ); - ptr = (BYTE *)((UINT_PTR)buffer & ~63) + 64; - ptr1 = HeapReAlloc( heap, 0, ptr, 1 ); - ok( !ptr1, "HeapReAlloc succeeded\n" ); - ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); -#endif + if (0) /* crashes */ + { + SetLastError( 0xdeadbeef ); + ptr1 = HeapReAlloc( heap, 0, (void *)0xdeadbe00, 1 ); + ok( !ptr1, "HeapReAlloc succeeded\n" ); + ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + ptr = (BYTE *)((UINT_PTR)buffer & ~63) + 64; + ptr1 = HeapReAlloc( heap, 0, ptr, 1 ); + ok( !ptr1, "HeapReAlloc succeeded\n" ); + ok( GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError() ); + } SetLastError( 0xdeadbeef ); ret = HeapValidate( heap, 0, NULL ); @@ -1557,14 +1559,18 @@ static void test_GlobalAlloc(void) todo_wine ok( ret, "GlobalUnlock failed, error %lu\n", GetLastError() ); ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); -#if 0 /* corrupts Wine heap */ SetLastError( 0xdeadbeef ); tmp_mem = GlobalReAlloc( mem, 0, GMEM_MOVEABLE ); - todo_wine ok( !tmp_mem, "GlobalReAlloc succeeded\n" ); - todo_wine ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); -#endif + if (sizeof(void *) != 8) /* crashes on 64-bit */ + { + SetLastError( 0xdeadbeef ); + tmp_mem = GlobalHandle( mem ); + ok( !tmp_mem, "GlobalHandle succeeded\n" ); + todo_wine + ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + } /* invalid handles are caught */ SetLastError( 0xdeadbeef ); @@ -1592,6 +1598,20 @@ static void test_GlobalAlloc(void) tmp_mem = GlobalReAlloc( invalid_mem, 0, GMEM_MOVEABLE ); ok( !tmp_mem, "GlobalReAlloc succeeded\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + if (sizeof(void *) != 8) /* crashes on 64-bit */ + { + SetLastError( 0xdeadbeef ); + tmp_mem = GlobalHandle( invalid_mem ); + ok( !tmp_mem, "GlobalHandle succeeded\n" ); + todo_wine + ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + ret = pRtlGetUserInfoHeap( GetProcessHeap(), 0, invalid_mem, (void **)&tmp_ptr, &tmp_flags ); + todo_wine + ok( !ret, "RtlGetUserInfoHeap failed, error %lu\n", GetLastError() ); + todo_wine + ok( GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError() ); + } /* invalid pointers are caught */ SetLastError( 0xdeadbeef ); @@ -1624,6 +1644,18 @@ static void test_GlobalAlloc(void) ok( !tmp_mem, "GlobalReAlloc succeeded\n" ); todo_wine ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + tmp_mem = GlobalHandle( invalid_ptr ); + ok( !tmp_mem, "GlobalHandle succeeded\n" ); + todo_wine + ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + if (0) /* crashes */ + { + SetLastError( 0xdeadbeef ); + ret = pRtlGetUserInfoHeap( GetProcessHeap(), 0, invalid_ptr, (void **)&tmp_ptr, &tmp_flags ); + ok( ret, "RtlGetUserInfoHeap failed, error %lu\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + } /* GMEM_FIXED block doesn't allow resize, though it succeeds with GMEM_MODIFY */ mem = GlobalAlloc( GMEM_FIXED, 10 ); @@ -1912,14 +1944,18 @@ static void test_LocalAlloc(void) ret = LocalUnlock( mem ); ok( !ret, "LocalUnlock succeeded\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); -#if 0 /* corrupts Wine heap */ SetLastError( 0xdeadbeef ); tmp_mem = LocalReAlloc( mem, 0, LMEM_MOVEABLE ); - todo_wine ok( !tmp_mem, "LocalReAlloc succeeded\n" ); - todo_wine ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); -#endif + if (sizeof(void *) != 8) /* crashes on 64-bit */ + { + SetLastError( 0xdeadbeef ); + tmp_mem = LocalHandle( mem ); + ok( !tmp_mem, "LocalHandle succeeded\n" ); + todo_wine + ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + } /* invalid handles are caught */ SetLastError( 0xdeadbeef ); @@ -1946,6 +1982,14 @@ static void test_LocalAlloc(void) tmp_mem = LocalReAlloc( invalid_mem, 0, LMEM_MOVEABLE ); ok( !tmp_mem, "LocalReAlloc succeeded\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + if (sizeof(void *) != 8) /* crashes on 64-bit */ + { + SetLastError( 0xdeadbeef ); + tmp_mem = LocalHandle( invalid_mem ); + ok( !tmp_mem, "LocalHandle succeeded\n" ); + todo_wine + ok( GetLastError() == ERROR_INVALID_HANDLE, "got error %lu\n", GetLastError() ); + } /* invalid pointers are caught */ SetLastError( 0xdeadbeef ); @@ -1977,6 +2021,11 @@ static void test_LocalAlloc(void) ok( !tmp_mem, "LocalReAlloc succeeded\n" ); todo_wine ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + tmp_mem = LocalHandle( invalid_ptr ); + ok( !tmp_mem, "LocalHandle succeeded\n" ); + todo_wine + ok( GetLastError() == ERROR_NOACCESS, "got error %lu\n", GetLastError() ); /* LMEM_FIXED block doesn't allow resize, though it succeeds with LMEM_MODIFY */ mem = LocalAlloc( LMEM_FIXED, 10 );
1
0
0
0
Jacek Caban : winevulkan: Get rid of *_host types.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: ef25dd2446e9c39b71a6199d8235a3734d1d20b4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ef25dd2446e9c39b71a6199d8235a3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 9 21:51:26 2022 +0100 winevulkan: Get rid of *_host types. Use WINE_VK_HOST instead. --- dlls/winevulkan/make_vulkan | 73 +- dlls/winevulkan/vulkan.c | 16 +- dlls/winevulkan/vulkan_private.h | 1 + dlls/winevulkan/vulkan_thunks.c | 962 ++++++------- dlls/winevulkan/vulkan_thunks.h | 2764 +++----------------------------------- 5 files changed, 662 insertions(+), 3154 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Use local structs declarations for 32-bit conversion functions.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: 0b50354930fb7cdad3f3714a29275902672e1c95 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0b50354930fb7cdad3f3714a292759…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Oct 23 14:53:35 2022 +0200 winevulkan: Use local structs declarations for 32-bit conversion functions. --- dlls/winevulkan/make_vulkan | 52 +- dlls/winevulkan/vulkan_thunks.c | 2638 ++++++++++++++++++++++++++++++++------- 2 files changed, 2252 insertions(+), 438 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Fix host aliases declaration.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: c479ffcd5d37b3bef77b4c137c54281d00b2a955 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c479ffcd5d37b3bef77b4c137c5428…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 9 21:25:22 2022 +0100 winevulkan: Fix host aliases declaration. --- dlls/winevulkan/make_vulkan | 18 +++-- dlls/winevulkan/vulkan_thunks.h | 151 +++++++++++++++++++++++----------------- 2 files changed, 98 insertions(+), 71 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Use local params struct declarations for 32-bit thunks.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: ab36f7d5ed9a52b1a167b32fd08aa263dc1c7182 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ab36f7d5ed9a52b1a167b32fd08aa2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Oct 23 14:12:56 2022 +0200 winevulkan: Use local params struct declarations for 32-bit thunks. --- dlls/winevulkan/make_vulkan | 13 +- dlls/winevulkan/vulkan_thunks.c | 4019 ++++++++++++++++++++++++++++++++++----- 2 files changed, 3516 insertions(+), 516 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Add support for pointer array conversion.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: b88d373bfb052f281264efe5937b922a3a2c15aa URL:
https://gitlab.winehq.org/wine/wine/-/commit/b88d373bfb052f281264efe5937b92…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 9 18:17:37 2022 +0100 winevulkan: Add support for pointer array conversion. And use it for VkAccelerationStructureGeometryKHR. --- dlls/winevulkan/make_vulkan | 77 +++++++++++++++++++++++++---------------- dlls/winevulkan/vulkan_thunks.c | 68 +++++++++++++++++++++++++++++++++--- dlls/winevulkan/vulkan_thunks.h | 17 +++++++-- 3 files changed, 126 insertions(+), 36 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Preserve const in array conversion output types.
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: 99a0d58dfdc26015c47dfd4c5aad6b24e46fa0ff URL:
https://gitlab.winehq.org/wine/wine/-/commit/99a0d58dfdc26015c47dfd4c5aad6b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 9 18:33:14 2022 +0100 winevulkan: Preserve const in array conversion output types. --- dlls/winevulkan/make_vulkan | 6 +- dlls/winevulkan/vulkan_thunks.c | 200 ++++++++++++++++++++-------------------- 2 files changed, 104 insertions(+), 102 deletions(-)
1
0
0
0
Jacek Caban : winevulkan: Fix handling unions in needs_alignment().
by Alexandre Julliard
10 Nov '22
10 Nov '22
Module: wine Branch: master Commit: 8463c4f12393b752c74295e10d4e841fde81f49f URL:
https://gitlab.winehq.org/wine/wine/-/commit/8463c4f12393b752c74295e10d4e84…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Nov 9 16:13:54 2022 +0100 winevulkan: Fix handling unions in needs_alignment(). --- dlls/winevulkan/make_vulkan | 14 ++++--- dlls/winevulkan/vulkan_thunks.c | 87 ++++++++++++++++++++++++++++++++++++++++- dlls/winevulkan/vulkan_thunks.h | 28 ++++++++++++- include/wine/vulkan.h | 40 +++++++++---------- 4 files changed, 140 insertions(+), 29 deletions(-)
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
118
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200