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
March 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
775 discussions
Start a n
N
ew thread
Piotr Caban : advapi32/tests: Remove all files created by RegLoadAppKey tests.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: b13477deb437a6c5b0b73753408adf1220438a8b URL:
https://gitlab.winehq.org/wine/wine/-/commit/b13477deb437a6c5b0b73753408adf…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 21 20:21:16 2024 +0100 advapi32/tests: Remove all files created by RegLoadAppKey tests. --- dlls/advapi32/tests/registry.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 2407eddd813..2afebb3365b 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1673,31 +1673,26 @@ static void wait_file_available(char *path) static void test_reg_load_app_key(void) { DWORD ret, size; - char temppath[MAX_PATH], hivefilepath[MAX_PATH]; + char hivefilepath[2 * MAX_PATH], *p; const BYTE test_data[] = "Hello World"; BYTE output[sizeof(test_data)]; HKEY appkey = NULL; - GetTempPathA(sizeof(temppath), temppath); - GetTempFileNameA(temppath, "key", 0, hivefilepath); - DeleteFileA(hivefilepath); - - if (!set_privileges(SE_BACKUP_NAME, TRUE) || - !set_privileges(SE_RESTORE_NAME, FALSE)) + if (!set_privileges(SE_BACKUP_NAME, TRUE)) { win_skip("Failed to set SE_BACKUP_NAME privileges, skipping tests\n"); return; } + GetTempPathA(MAX_PATH, hivefilepath); + strcat(hivefilepath, "\\wine_reg_test"); + CreateDirectoryA(hivefilepath, NULL); + strcat(hivefilepath, "\\saved_key"); + ret = RegSaveKeyA(hkey_main, hivefilepath, NULL); - if (ret != ERROR_SUCCESS) - { - win_skip("Failed to save test key 0x%lx\n", ret); - return; - } + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); set_privileges(SE_BACKUP_NAME, FALSE); - set_privileges(SE_RESTORE_NAME, FALSE); /* Test simple key load */ /* Check if the changes are saved */ @@ -1726,8 +1721,10 @@ static void test_reg_load_app_key(void) RegCloseKey(appkey); wait_file_available(hivefilepath); - ret = DeleteFileA(hivefilepath); - ok(ret, "couldn't delete hive file %ld\n", GetLastError()); + + p = strrchr(hivefilepath, '\\'); + *p = 0; + delete_dir(hivefilepath); } /* tests that show that RegConnectRegistry and
1
0
0
0
Piotr Caban : advapi32/tests: Test if modifications are saved in RegUnLoadKey.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: cc62cdc1fd025c0c6f728ee82502315f9e8a05e8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/cc62cdc1fd025c0c6f728ee8250231…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 21 14:54:13 2024 +0100 advapi32/tests: Test if modifications are saved in RegUnLoadKey. --- dlls/advapi32/tests/registry.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index f85c73ed4f2..2407eddd813 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1575,11 +1575,11 @@ static void delete_dir(const char *path) static void test_reg_load_key(void) { - char saved_key[2 * MAX_PATH], *p; + char saved_key[2 * MAX_PATH], buf[16], *p; UNICODE_STRING key_name; OBJECT_ATTRIBUTES attr; NTSTATUS status; - DWORD ret; + DWORD ret, size; HKEY key; if (!set_privileges(SE_RESTORE_NAME, TRUE) || @@ -1603,6 +1603,9 @@ static void test_reg_load_key(void) ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &key); ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + ret = RegSetValueExA(key, "test", 0, REG_SZ, (BYTE *)"value", 6); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + /* try to unload though the key handle is live */ pRtlInitUnicodeString(&key_name, L"\\REGISTRY\\Machine\\Test"); InitializeObjectAttributes(&attr, &key_name, OBJ_CASE_INSENSITIVE, NULL, NULL); @@ -1614,6 +1617,27 @@ static void test_reg_load_key(void) ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test"); ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + /* check if modifications are saved */ + ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", saved_key); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + + ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &key); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + + size = sizeof(buf); + ret = RegGetValueA(key, NULL, "test", RRF_RT_REG_SZ, NULL, buf, &size); + todo_wine ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + if (ret == ERROR_SUCCESS) + { + ok(size == 6, "size = %ld\n", size); + ok(!strcmp(buf, "value"), "buf = %s\n", buf); + } + + RegCloseKey(key); + + ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test"); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + pRtlInitUnicodeString(&key_name, L"\\REGISTRY\\User\\.Default"); InitializeObjectAttributes(&attr, &key_name, OBJ_CASE_INSENSITIVE, NULL, NULL); status = pNtUnloadKey(&attr);
1
0
0
0
Piotr Caban : advapi32/tests: Remove all files created by RegLoadKey tests.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: 98bd248778b8dd0d052e4e68146ac22fd9021af0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/98bd248778b8dd0d052e4e68146ac2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 21 19:27:40 2024 +0100 advapi32/tests: Remove all files created by RegLoadKey tests. --- dlls/advapi32/tests/registry.c | 56 ++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 2430e2330dd..f85c73ed4f2 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1542,25 +1542,40 @@ static BOOL set_privileges(LPCSTR privilege, BOOL set) return TRUE; } -static void test_reg_save_key(void) +static void delete_dir(const char *path) { - DWORD ret; - - if (!set_privileges(SE_BACKUP_NAME, TRUE) || - !set_privileges(SE_RESTORE_NAME, FALSE)) + char file[2 * MAX_PATH], *p; + WIN32_FIND_DATAA fd; + HANDLE hfind; + BOOL r; + + strcpy(file, path); + p = file + strlen(file); + p[0] = '\\'; + p[1] = '*'; + p[2] = 0; + hfind = FindFirstFileA(file, &fd); + if (hfind != INVALID_HANDLE_VALUE) { - win_skip("Failed to set SE_BACKUP_NAME privileges, skipping tests\n"); - return; + do + { + if (!strcmp(fd.cFileName, ".") || !strcmp(fd.cFileName, "..")) + continue; + + strcpy(p + 1, fd.cFileName); + r = DeleteFileA(file); + ok(r, "DeleteFile failed on %s: %ld\n", debugstr_a(file), GetLastError()); + } while(FindNextFileA(hfind, &fd)); + FindClose(hfind); } - ret = RegSaveKeyA(hkey_main, "saved_key", NULL); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); - - set_privileges(SE_BACKUP_NAME, FALSE); + r = RemoveDirectoryA(path); + ok(r, "RemoveDirectory failed: %ld\n", GetLastError()); } static void test_reg_load_key(void) { + char saved_key[2 * MAX_PATH], *p; UNICODE_STRING key_name; OBJECT_ATTRIBUTES attr; NTSTATUS status; @@ -1568,13 +1583,21 @@ static void test_reg_load_key(void) HKEY key; if (!set_privileges(SE_RESTORE_NAME, TRUE) || - !set_privileges(SE_BACKUP_NAME, FALSE)) + !set_privileges(SE_BACKUP_NAME, TRUE)) { win_skip("Failed to set SE_RESTORE_NAME privileges, skipping tests\n"); return; } - ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key"); + GetTempPathA(MAX_PATH, saved_key); + strcat(saved_key, "\\wine_reg_test"); + CreateDirectoryA(saved_key, NULL); + strcat(saved_key, "\\saved_key"); + + ret = RegSaveKeyA(hkey_main, saved_key, NULL); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + + ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", saved_key); ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &key); @@ -1600,9 +1623,11 @@ static void test_reg_load_key(void) ok(ret == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", ret); set_privileges(SE_RESTORE_NAME, FALSE); + set_privileges(SE_BACKUP_NAME, FALSE); - DeleteFileA("saved_key"); - DeleteFileA("saved_key.LOG"); + p = strrchr(saved_key, '\\'); + *p = 0; + delete_dir(saved_key); } /* Helper function to wait for a file blocked by the registry to be available */ @@ -4966,7 +4991,6 @@ START_TEST(registry) test_classesroot(); test_classesroot_enum(); test_classesroot_mask(); - test_reg_save_key(); test_reg_load_key(); test_reg_load_app_key(); test_reg_copy_tree();
1
0
0
0
Piotr Caban : advapi32/tests: Merge RegLoadKey and RegUnLoadKey tests.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: cdc842f60d17c0135b9b7e48834355c9fe231ded URL:
https://gitlab.winehq.org/wine/wine/-/commit/cdc842f60d17c0135b9b7e48834355…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 21 14:26:07 2024 +0100 advapi32/tests: Merge RegLoadKey and RegUnLoadKey tests. --- dlls/advapi32/tests/registry.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 27ee3fbbe30..2430e2330dd 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1560,29 +1560,6 @@ static void test_reg_save_key(void) } static void test_reg_load_key(void) -{ - DWORD ret; - HKEY hkHandle; - - if (!set_privileges(SE_RESTORE_NAME, TRUE) || - !set_privileges(SE_BACKUP_NAME, FALSE)) - { - win_skip("Failed to set SE_RESTORE_NAME privileges, skipping tests\n"); - return; - } - - ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key"); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); - - set_privileges(SE_RESTORE_NAME, FALSE); - - ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &hkHandle); - ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); - - RegCloseKey(hkHandle); -} - -static void test_reg_unload_key(void) { UNICODE_STRING key_name; OBJECT_ATTRIBUTES attr; @@ -1597,7 +1574,10 @@ static void test_reg_unload_key(void) return; } - ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Test", 0, KEY_READ, &key); + ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key"); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); + + ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &key); ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret); /* try to unload though the key handle is live */ @@ -4988,7 +4968,6 @@ START_TEST(registry) test_classesroot_mask(); test_reg_save_key(); test_reg_load_key(); - test_reg_unload_key(); test_reg_load_app_key(); test_reg_copy_tree(); test_reg_delete_tree();
1
0
0
0
Piotr Caban : winedump: Fix REG_DWORD dumping with no data.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: d7aaf51459dbbc029a47dfbeb4d78e705ff25e6d URL:
https://gitlab.winehq.org/wine/wine/-/commit/d7aaf51459dbbc029a47dfbeb4d78e…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Mar 21 16:18:27 2024 +0100 winedump: Fix REG_DWORD dumping with no data. --- tools/winedump/reg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/winedump/reg.c b/tools/winedump/reg.c index f100eb47171..29478e06592 100644 --- a/tools/winedump/reg.c +++ b/tools/winedump/reg.c @@ -279,8 +279,11 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off) } break; case REG_DWORD: - assert(data_size == sizeof(DWORD)); - printf("dword:%08x", *(unsigned int *)data); + assert(data_size == sizeof(DWORD) || !data_size); + if (data_size) + printf("dword:%08x", *(unsigned int *)data); + else + printf("hex(4):"); break; case REG_MULTI_SZ: printf("str(7):\"");
1
0
0
0
Alexandre Julliard : wow64: Access the BTCpuSimulate backend function pointer directly.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: 753875e80b45f00848c840da11b96de19a6084bc URL:
https://gitlab.winehq.org/wine/wine/-/commit/753875e80b45f00848c840da11b96d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 21 18:25:19 2024 +0100 wow64: Access the BTCpuSimulate backend function pointer directly. --- dlls/wow64/syscall.c | 53 +++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 298345e77e0..0087a684d47 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -100,7 +100,7 @@ static BOOLEAN (WINAPI *pBTCpuIsProcessorFeaturePresent)(UINT); static void (WINAPI *pBTCpuProcessInit)(void); static NTSTATUS (WINAPI *pBTCpuSetContext)(HANDLE,HANDLE,void *,void *); static void (WINAPI *pBTCpuThreadInit)(void); -static void (WINAPI *pBTCpuSimulate)(void); +static void (WINAPI *pBTCpuSimulate)(void) __attribute__((used)); static void * (WINAPI *p__wine_get_unix_opcode)(void); static void * (WINAPI *pKiRaiseUserExceptionDispatcher)(void); void (WINAPI *pBTCpuNotifyFlushInstructionCache2)( const void *, SIZE_T ) = NULL; @@ -974,41 +974,48 @@ NTSTATUS WINAPI Wow64SystemServiceEx( UINT num, UINT *args ) * cpu_simulate */ #ifdef __aarch64__ -extern void DECLSPEC_NORETURN cpu_simulate( void (*func)(void) ); +extern void DECLSPEC_NORETURN cpu_simulate(void); __ASM_GLOBAL_FUNC( cpu_simulate, - "stp x29, x30, [sp, #-32]!\n\t" - ".seh_save_fplr_x 32\n\t" + "stp x29, x30, [sp, #-16]!\n\t" + ".seh_save_fplr_x 16\n\t" ".seh_endprologue\n\t" - ".seh_handler cpu_simulate_handler, @except\n\t" - "str x0, [sp, #16]\n" + ".seh_handler cpu_simulate_handler, @except\n" ".Lcpu_simulate_loop:\n\t" - "ldr x0, [sp, #16]\n\t" - "blr x0\n\t" + "adrp x16, pBTCpuSimulate\n\t" + "ldr x16, [x16, :lo12:pBTCpuSimulate]\n\t" + "blr x16\n\t" "b .Lcpu_simulate_loop" ) __ASM_GLOBAL_FUNC( cpu_simulate_handler, - "stp x29, x30, [sp, #-32]!\n\t" - ".seh_save_fplr_x 32\n\t" + "stp x29, x30, [sp, #-48]!\n\t" + ".seh_save_fplr_x 48\n\t" + "stp x19, x20, [sp, #16]\n\t" + ".seh_save_regp x19, 16\n\t" ".seh_endprologue\n\t" "mov x19, x0\n\t" /* record */ "mov x20, x1\n\t" /* frame */ - "stp x0, x2, [sp, #16]\n\t" /* record, context */ - "add x0, sp, #16\n\t" + "ldr w4, [x0, #4]\n\t" /* record->ExceptionFlags */ + "tst w4, #6\n\t" /* EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND */ + "b.ne 1f\n\t" + "stp x0, x2, [sp, #32]\n\t" /* record, context */ + "add x0, sp, #32\n\t" "bl Wow64PassExceptionToGuest\n\t" - "mov x20, x0\n\t" /* frame */ + "mov x0, x20\n\t" /* frame */ "adr x1, .Lcpu_simulate_loop\n\t" /* target */ - "mov x19, x2\n\t" /* record */ + "mov x2, x19\n\t" /* record */ "bl RtlUnwind\n\t" - "brk #1" ) + "1:\tmov w0, #1\n\t" /* ExceptionContinueSearch */ + "ldp x19, x20, [sp, #16]\n\t" + "ldp x29, x30, [sp], #48\n\t" + "ret" ) #else -extern void DECLSPEC_NORETURN cpu_simulate( void (*func)(void) ); +extern void DECLSPEC_NORETURN cpu_simulate(void); __ASM_GLOBAL_FUNC( cpu_simulate, "subq $0x28, %rsp\n\t" ".seh_stackalloc 0x28\n\t" ".seh_endprologue\n\t" ".seh_handler cpu_simulate_handler, @except\n\t" - "movq %rcx,0x20(%rsp)\n" ".Lcpu_simulate_loop:\n\t" - "call *0x20(%rsp)\n\t" + "call *pBTCpuSimulate(%rip)\n\t" "jmp .Lcpu_simulate_loop" ) __ASM_GLOBAL_FUNC( cpu_simulate_handler, "subq $0x38, %rsp\n\t" @@ -1098,7 +1105,7 @@ void WINAPI Wow64ApcRoutine( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3, CON ctx.Eip = pLdrSystemDllInitBlock->pKiUserApcDispatcher; frame.wow_context = &stack->context; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); - cpu_simulate( pBTCpuSimulate ); + cpu_simulate(); } break; @@ -1124,7 +1131,7 @@ void WINAPI Wow64ApcRoutine( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3, CON ctx.R3 = arg3; frame.wow_context = &stack->context; pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); - cpu_simulate( pBTCpuSimulate ); + cpu_simulate(); } break; } @@ -1187,7 +1194,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len, pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); if (!__wine_setjmpex( &frame.jmpbuf, NULL )) - cpu_simulate( pBTCpuSimulate ); + cpu_simulate(); else pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &orig_ctx ); } @@ -1212,7 +1219,7 @@ NTSTATUS WINAPI Wow64KiUserCallbackDispatcher( ULONG id, void *args, ULONG len, pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &ctx ); if (!__wine_setjmpex( &frame.jmpbuf, NULL )) - cpu_simulate( pBTCpuSimulate ); + cpu_simulate(); else pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &orig_ctx ); } @@ -1236,7 +1243,7 @@ void WINAPI Wow64LdrpInitialize( CONTEXT *context ) RtlRunOnceExecuteOnce( &init_done, process_init, NULL, NULL ); thread_init(); - cpu_simulate( pBTCpuSimulate ); + cpu_simulate(); }
1
0
0
0
Alexandre Julliard : wow64: Always use a .seh handler in cpu_simulate().
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: d09501691e92a555cf1e229dacdd0121e2b18163 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d09501691e92a555cf1e229dacdd01…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 21 18:14:27 2024 +0100 wow64: Always use a .seh handler in cpu_simulate(). --- dlls/wow64/syscall.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 2314e2973d8..298345e77e0 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -999,8 +999,7 @@ __ASM_GLOBAL_FUNC( cpu_simulate_handler, "mov x19, x2\n\t" /* record */ "bl RtlUnwind\n\t" "brk #1" ) - -#elif defined __WINE_PE_BUILD +#else extern void DECLSPEC_NORETURN cpu_simulate( void (*func)(void) ); __ASM_GLOBAL_FUNC( cpu_simulate, "subq $0x28, %rsp\n\t" @@ -1026,28 +1025,6 @@ __ASM_GLOBAL_FUNC( cpu_simulate_handler, "movq %rsi,%r8\n\t" /* record */ "call RtlUnwind\n\t" "int3" ) -#else -static LONG CALLBACK simulate_filter( EXCEPTION_POINTERS *ptrs ) -{ - Wow64PassExceptionToGuest( ptrs ); - return EXCEPTION_EXECUTE_HANDLER; -} - -static void cpu_simulate( void (*func)(void) ) -{ - for (;;) - { - __TRY - { - func(); - } - __EXCEPT( simulate_filter ) - { - /* restart simulation loop */ - } - __ENDTRY - } -} #endif
1
0
0
0
Alexandre Julliard : wow64: Use a .seh handler in raise_exception().
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: d2c0efe16351259ad3f8b934d2e17743771c3564 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d2c0efe16351259ad3f8b934d2e177…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 21 18:11:36 2024 +0100 wow64: Use a .seh handler in raise_exception(). --- dlls/wow64/syscall.c | 135 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 56 deletions(-) diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 1b52db370a3..2314e2973d8 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -184,7 +184,8 @@ static NTSTATUS get_context_return_value( void *wow_context ) /********************************************************************** * call_user_exception_dispatcher */ -static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32_ptr, void *ctx64_ptr ) +static void __attribute__((used)) call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32_ptr, + void *ctx64_ptr ) { switch (current_machine) { @@ -331,40 +332,82 @@ static void call_raise_user_exception_dispatcher( ULONG code ) /* based on RtlRaiseException: call NtRaiseException with context setup to return to caller */ -void WINAPI raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ); -#ifdef __x86_64__ -__ASM_GLOBAL_FUNC( raise_exception, - "sub $0x28,%rsp\n\t" - __ASM_SEH(".seh_stackalloc 0x28\n\t") - __ASM_SEH(".seh_endprologue\n\t") - __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") - "movq %rcx,(%rsp)\n\t" - "movq %rdx,%rcx\n\t" - "call " __ASM_NAME("RtlCaptureContext") "\n\t" - "leaq 0x30(%rsp),%rax\n\t" /* orig stack pointer */ - "movq %rax,0x98(%rdx)\n\t" /* context->Rsp */ - "movq (%rsp),%rcx\n\t" /* original first parameter */ - "movq 0x28(%rsp),%rax\n\t" /* return address */ - "movq %rax,0xf8(%rdx)\n\t" /* context->Rip */ - "call " __ASM_NAME("NtRaiseException") ) -#elif defined(__aarch64__) +void WINAPI raise_exception( EXCEPTION_RECORD32 *rec32, void *ctx32, + BOOL first_chance, EXCEPTION_RECORD *rec ); +#ifdef __aarch64__ __ASM_GLOBAL_FUNC( raise_exception, - "stp x29, x30, [sp, #-32]!\n\t" - __ASM_SEH(".seh_save_fplr_x 32\n\t") - __ASM_SEH(".seh_endprologue\n\t") - __ASM_CFI(".cfi_def_cfa x29, 32\n\t") - __ASM_CFI(".cfi_offset x30, -24\n\t") - __ASM_CFI(".cfi_offset x29, -32\n\t") - "mov x29, sp\n\t" + "sub sp, sp, #0x390\n\t" /* sizeof(context) */ + ".seh_stackalloc 0x390\n\t" + "stp x29, x30, [sp, #-48]!\n\t" + ".seh_save_fplr_x 48\n\t" + ".seh_endprologue\n\t" + ".seh_handler raise_exception_handler, @except\n\t" "stp x0, x1, [sp, #16]\n\t" - "mov x0, x1\n\t" - "bl " __ASM_NAME("RtlCaptureContext") "\n\t" - "ldp x0, x1, [sp, #16]\n\t" /* orig parameters */ - "ldp x4, x5, [sp]\n\t" /* frame pointer, return address */ - "stp x4, x5, [x1, #0xf0]\n\t" /* context->Fp, Lr */ - "add x4, sp, #32\n\t" /* orig stack pointer */ - "stp x4, x5, [x1, #0x100]\n\t" /* context->Sp, Pc */ - "bl " __ASM_NAME("NtRaiseException") ) + "stp x2, x3, [sp, #32]\n\t" + "add x0, sp, #48\n\t" + "bl RtlCaptureContext\n\t" + "add x1, sp, #48\n\t" /* context */ + "adr x2, 1f\n\t" /* return address */ + "str x2, [x1, #0x108]\n\t" /* context->Pc */ + "ldp x2, x0, [sp, #32]\n\t" /* first_chance, rec */ + "bl NtRaiseException\n" + "raise_exception_ret:\n\t" + "ldp x0, x1, [sp, #16]\n\t" /* rec32, ctx32 */ + "add x2, sp, #48\n\t" /* context */ + "bl call_user_exception_dispatcher\n" + "1:\tnop\n\t" + "ldp x29, x30, [sp], #48\n\t" + "add sp, sp, #0x390\n\t" + "ret" ) +__ASM_GLOBAL_FUNC( raise_exception_handler, + "stp x29, x30, [sp, #-16]!\n\t" + ".seh_save_fplr_x 16\n\t" + ".seh_endprologue\n\t" + "ldr w4, [x0, #4]\n\t" /* record->ExceptionFlags */ + "tst w4, #6\n\t" /* EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND */ + "b.ne 1f\n\t" + "mov x2, x0\n\t" /* rec */ + "mov x0, x1\n\t" /* frame */ + "adr x1, raise_exception_ret\n\t" + "bl RtlUnwind\n" + "1:\tmov w0, #1\n\t" /* ExceptionContinueSearch */ + "ldp x29, x30, [sp], #16\n\t" + "ret" ) +#else +__ASM_GLOBAL_FUNC( raise_exception, + "sub $0x4d8,%rsp\n\t" /* sizeof(context) + alignment */ + ".seh_stackalloc 0x4d8\n\t" + ".seh_endprologue\n\t" + ".seh_handler raise_exception_handler, @except\n\t" + "movq %rcx,0x4e0(%rsp)\n\t" + "movq %rdx,0x4e8(%rsp)\n\t" + "movq %r8,0x4f0(%rsp)\n\t" + "movq %r9,0x4f8(%rsp)\n\t" + "movq %rsp,%rcx\n\t" + "call RtlCaptureContext\n\t" + "movq %rsp,%rdx\n\t" /* context */ + "leaq 1f(%rip),%rax\n\t" /* return address */ + "movq %rax,0xf8(%rdx)\n\t" /* context->Rip */ + "movq 0x4f8(%rsp),%rcx\n\t" /* rec */ + "movq 0x4f0(%rsp),%r8\n\t" /* first_chance */ + "call NtRaiseException\n" + "raise_exception_ret:\n\t" + "mov 0x4e0(%rsp),%rcx\n\t" /* rec32 */ + "mov 0x4e8(%rsp),%rdx\n\t" /* ctx32 */ + "movq %rsp,%r8\n\t" /* context */ + "call call_user_exception_dispatcher\n" + "1:\tnop\n\t" + "add $0x4d8,%rsp\n\t" + "ret" ) +__ASM_GLOBAL_FUNC( raise_exception_handler, + "sub $0x28,%rsp\n\t" + ".seh_stackalloc 0x28\n\t" + ".seh_endprologue\n\t" + "movq %rcx,%r8\n\t" /* rec */ + "movq %rdx,%rcx\n\t" /* frame */ + "leaq raise_exception_ret(%rip),%rdx\n\t" + "call RtlUnwind\n\t" + "int3" ) #endif @@ -563,20 +606,8 @@ NTSTATUS WINAPI wow64_NtRaiseException( UINT *args ) void *context32 = get_ptr( &args ); BOOL first_chance = get_ulong( &args ); - EXCEPTION_RECORD *rec = exception_record_32to64( rec32 ); - CONTEXT context; - pBTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, context32 ); - - __TRY - { - raise_exception( rec, &context, first_chance ); - } - __EXCEPT_ALL - { - call_user_exception_dispatcher( rec32, context32, &context ); - } - __ENDTRY + raise_exception( rec32, context32, first_chance, exception_record_32to64( rec32 )); return STATUS_SUCCESS; } @@ -1357,7 +1388,6 @@ void WINAPI Wow64ProcessPendingCrossProcessItems(void) NTSTATUS WINAPI Wow64RaiseException( int code, EXCEPTION_RECORD *rec ) { EXCEPTION_RECORD32 rec32; - CONTEXT context; BOOL first_chance = TRUE; union { @@ -1441,14 +1471,7 @@ NTSTATUS WINAPI Wow64RaiseException( int code, EXCEPTION_RECORD *rec ) } exception_record_64to32( &rec32, rec ); - __TRY - { - raise_exception( rec, &context, first_chance ); - } - __EXCEPT_ALL - { - call_user_exception_dispatcher( &rec32, &ctx32, NULL ); - } - __ENDTRY + raise_exception( &rec32, &ctx32, first_chance, rec ); + return STATUS_SUCCESS; }
1
0
0
0
Alexandre Julliard : configure: Don't build wow64 support in non-PE builds.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: e317eafe8f179fe927d72d9ae0e9247472556783 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e317eafe8f179fe927d72d9ae0e924…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 21 18:13:48 2024 +0100 configure: Don't build wow64 support in non-PE builds. --- configure | 44 ++++++++++++++++++++++++++------------------ configure.ac | 49 +++++++++++++++++++++++++++++-------------------- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/configure b/configure index 9a7bc56bff4..91b272c4aea 100755 --- a/configure +++ b/configure @@ -6404,24 +6404,6 @@ printf "%s\n" "$wine_cv_float_abi" >&6; } ;; esac -enable_win16=${enable_win16:-i386} -enable_win64=${enable_win64:-no} -enable_wow64=${enable_wow64:-aarch64,x86_64} -enable_wow64win=${enable_wow64win:-aarch64,x86_64} -enable_wow64cpu=${enable_wow64cpu:-x86_64} -enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec} - -enable_cmd=${enable_cmd:-yes} -enable_dllhost=${enable_dllhost:-yes} -enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec} -enable_dxdiag=${enable_dxdiag:-yes} -enable_msiexec=${enable_msiexec:-yes} -enable_netsh=${enable_netsh:-yes} -enable_regsvr32=${enable_regsvr32:-yes} -enable_rundll32=${enable_rundll32:-yes} - -enable_winetest=${enable_winetest:-$enable_tests} - if test "x$enable_win64" = "xyes" then test -z "$with_wine64" || as_fn_error $? "--enable-win64 and --with-wine64 are mutually exclusive. @@ -21806,6 +21788,32 @@ fi ;; esac +enable_win16=${enable_win16:-i386} +enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec} + +if test -n "$PE_ARCHS" +then + enable_wow64=${enable_wow64:-aarch64,x86_64} + enable_wow64win=${enable_wow64win:-aarch64,x86_64} + enable_wow64cpu=${enable_wow64cpu:-x86_64} +else + enable_wow64=${enable_wow64:-no} + enable_wow64win=${enable_wow64win:-no} + enable_wow64cpu=${enable_wow64cpu:-no} +fi + +enable_cmd=${enable_cmd:-yes} +enable_dllhost=${enable_dllhost:-yes} +enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec} +enable_dxdiag=${enable_dxdiag:-yes} +enable_msiexec=${enable_msiexec:-yes} +enable_netsh=${enable_netsh:-yes} +enable_regsvr32=${enable_regsvr32:-yes} +enable_rundll32=${enable_rundll32:-yes} + +enable_winetest=${enable_winetest:-$enable_tests} + + diff --git a/configure.ac b/configure.ac index fa81d912106..16f8ea99691 100644 --- a/configure.ac +++ b/configure.ac @@ -154,26 +154,6 @@ case $host in ;; esac -enable_win16=${enable_win16:-i386} -enable_win64=${enable_win64:-no} -enable_wow64=${enable_wow64:-aarch64,x86_64} -enable_wow64win=${enable_wow64win:-aarch64,x86_64} -enable_wow64cpu=${enable_wow64cpu:-x86_64} -enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec} - -dnl Explicitly enable some programs for arm64ec -enable_cmd=${enable_cmd:-yes} -enable_dllhost=${enable_dllhost:-yes} -enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec} -enable_dxdiag=${enable_dxdiag:-yes} -enable_msiexec=${enable_msiexec:-yes} -enable_netsh=${enable_netsh:-yes} -enable_regsvr32=${enable_regsvr32:-yes} -enable_rundll32=${enable_rundll32:-yes} - -dnl Disable winetest too if tests are disabled -enable_winetest=${enable_winetest:-$enable_tests} - dnl Some special cases for the 64-bit build if test "x$enable_win64" = "xyes" then @@ -2371,6 +2351,35 @@ case $host_vendor in *sun*) WINE_CHECK_DEFINE([__sun__]) ;; esac +dnl *** Check for modules to disable by default + +enable_win16=${enable_win16:-i386} +enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec} + +if test -n "$PE_ARCHS" +then + enable_wow64=${enable_wow64:-aarch64,x86_64} + enable_wow64win=${enable_wow64win:-aarch64,x86_64} + enable_wow64cpu=${enable_wow64cpu:-x86_64} +else + enable_wow64=${enable_wow64:-no} + enable_wow64win=${enable_wow64win:-no} + enable_wow64cpu=${enable_wow64cpu:-no} +fi + +dnl Explicitly enable some programs for arm64ec +enable_cmd=${enable_cmd:-yes} +enable_dllhost=${enable_dllhost:-yes} +enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec} +enable_dxdiag=${enable_dxdiag:-yes} +enable_msiexec=${enable_msiexec:-yes} +enable_netsh=${enable_netsh:-yes} +enable_regsvr32=${enable_regsvr32:-yes} +enable_rundll32=${enable_rundll32:-yes} + +dnl Disable winetest too if tests are disabled +enable_winetest=${enable_winetest:-$enable_tests} + dnl **** Generate output files **** AH_TOP([#ifndef __WINE_CONFIG_H
1
0
0
0
Rémi Bernon : ntoskrnl.exe: Open symbolic link with DELETE before making them temporary.
by Alexandre Julliard
21 Mar '24
21 Mar '24
Module: wine Branch: master Commit: f67b4f6bf45481cc59561b4498b4c7f174cb84bd URL:
https://gitlab.winehq.org/wine/wine/-/commit/f67b4f6bf45481cc59561b4498b4c7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 21 10:08:51 2024 +0100 ntoskrnl.exe: Open symbolic link with DELETE before making them temporary. --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index d2407d99448..7aaf66dd6db 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1793,7 +1793,7 @@ NTSTATUS WINAPI IoDeleteSymbolicLink( UNICODE_STRING *name ) attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - if (!(status = NtOpenSymbolicLinkObject( &handle, 0, &attr ))) + if (!(status = NtOpenSymbolicLinkObject( &handle, DELETE, &attr ))) { NtMakeTemporaryObject( handle ); NtClose( handle );
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
78
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
Results per page:
10
25
50
100
200