> I agree, so let's do s/wine-staging/Proton/g. I may greatly tarry before getting to it, so others should feel free to send the patch on my behalf.
I'm not exactly sure what you're trying to say here, but the Proton hack won't be acceptable upstream either.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2378#note_86858
structuredquery is required to support AQS filters in Windows.Devices.Enumeration's `FindAllAsync` methods, and this stubs adds a basic set of stubs to get the ball rolling.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6788
> app-specific
> wine-staging
I agree, so let's do s/wine-staging/Proton/g. I may greatly tarry before getting to it, so others should feel free to send the patch on my behalf.
> worked on by someone else
> you should
I welcome them superseding this patch with a proper fix, so I'm closing this MR. Interesting new IOCTL! As mentioned in https://gitlab.winehq.org/wine/wine/-/merge_requests/5522#note_86850 , my team obviated Office thus this patch the month after its submission.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2378#note_86854
> Adding a stub that doesn't actually help anything is basically just extra noise, and more code in the tree. In cases where someone is actively working on a proper implementation, it also often gets in their way. It may not be a big deal, but it's not exactly like there are zero disadvantages either.
Do you think the Waterfall development model could actually work better than Agile, especially in open source?
> author has probably given up on collaborating with the Wine project
Yeah, it was frustrating. But the reason was unrelated, being my team switching to Notion from Office. I also missed the email notifications. I'm not enthusiastic anymore about championing my patches, knowing I can always maintain a local patchset or submit them to Proton
> circumvention
Please don't accuse me of illegal behavior. I intentionally wrote `Sleep` not `TerminateThread`, which makes it a gray area, not necessarily illegal. The `Sleep` simulates a very inefficient algorithm (that Linux doesn't finish scheduling before heat death) on a busy computer, and I can replace it with a Collatz Conjecture verifier if you want. It's Microsoft's design decision that Office is "run until licensing fails" not "run after licensing succeeds" (which they chose if they cared), and Microsoft's code to change the title proves it's intentional
> patch-set fixing `v8jsi.dll`
That's my !2378 but I heard someone's working on a proper fix
> a private key ... cannot legally redistribute
No company publishes their [private key](https://en.wikipedia.org/w/index.php?title=Private_key)s. If we don't redistribute, we can adopt Switch emulators' key self-dumping requirement, and still be somewhat safe from their lawsuit's argument because Wine isn't mainly used for piracy
> where the license data is stored
I speculate it's in the registry like other licensing data
> first time contributors don't miss them.
Most other first time contributors can't read. It's better to be prepared to accept but fix their code
> licenses are encrypted
I didn't investigate how they are stored or if ciphertext can be directly returned. I don't want to be forced to investigate. My patch took an hour or two, and I'd hate to have to spend a week. This "proper implementation" requirement is going to make implementation cost months. The majority of potential contributors (like me) are only capable of small, incremental fixes
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5522#note_86850
On Tue Nov 5 06:18:28 2024 +0000, Zhiyi Zhang wrote:
> For Unicode notification conversions, you might want to take a look at
> 76f8ea75 and d7dcfe03.
<div><a target="_blank" href="https://gitlab.winehq.org/wine/wine/-/blob/6db2812411d45ca4b4d15dea9a00577e…"><code>pager.c</code>:<pre><code lang="c">static BOOL PAGER_AdjustBuffer(PAGER_INFO *infoPtr, INT size) { if (!infoPtr->pwszBuffer) infoPtr->pwszBuffer = Alloc(size); else if (infoPtr->nBufferSize < size) infoPtr->pwszBuffer = ReAlloc(infoPtr->pwszBuffer, size); if (!infoPtr->pwszBuffer) return FALSE; if (infoPtr->nBufferSize < size) infoPtr->nBufferSize = size; return TRUE; }</code></pre></a>Why is this function designed to leak old <code>infoPtr->pwszBuffer</code> when <code>ReAlloc(infoPtr->pwszBuffer, size)</code> returns <code>NULL</code>?</div>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6737#note_86848
The pointer in tmplocale gets freed in the second setlocale call.
Therefore ASan triggers when trying to restore the locale
the the already freed pointer in tmplocale in the third call to setlocale.
This appeared with a notepad.exe built with (a yet patched) llvm-mingw with ASan enabled,
when opening the Printer Setup dialog.
The stack traces seem to have utilized an in the wineprefix installed LLVM/llvm-symbolizer.exe.
```
wine64 notepad_asan.exe
=================================================================
==300==ERROR: AddressSanitizer: heap-use-after-free on address 0x7eeab5c60290 at pc 0x6ffffa80279f bp 0x7ffffe1fb570 sp 0x7ffffe1fb5b0
READ of size 2 at 0x7eeab5c60290 thread T0
0130:fixme:dbghelp:elf_search_auxv can't find symbol in module
#0 0x6ffffa80279e in strchr+0x28e (C:\x86_64\libclang_rt.asan_dynamic-x86_64.dll+0x18004279e)
#1 0x6ffffeb1666c in locale_to_sname Z:\home\bernhard\wine\dlls\msvcrt\locale.c:351
#2 0x6ffffeb16ce5 in create_locinfo Z:\home\bernhard\wine\dlls\msvcrt\locale.c:1357
#3 0x6ffffeb1a170 in setlocale Z:\home\bernhard\wine\dlls\msvcrt\locale.c:2054
#4 0x6ffffa1bf8c9 in PSDRV_ParsePPD Z:\home\bernhard\wine\dlls\wineps.drv\ppd.c:890
#5 0x6ffffa1bc0b7 in PSDRV_FindPrinterInfo Z:\home\bernhard\wine\dlls\wineps.drv\init.c:575
#6 0x6ffffa1b66b1 in DrvDocumentPropertySheets Z:\home\bernhard\wine\dlls\wineps.drv\driver.c:491
#7 0x6ffffc60b314 in DocumentPropertiesW Z:\home\bernhard\wine\dlls\winspool.drv\info.c:1854
#8 0x6ffffc611f97 in OpenPrinter2W Z:\home\bernhard\wine\dlls\winspool.drv\info.c:2057
#9 0x6ffffd666153 in PRINTDLG_ChangePrinterW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:1298
#10 0x6ffffd66786d in PRINTDLG_WMInitDialogW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:1660
#11 0x6ffffd667987 in PrintDlgProcW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:2126
#12 0x6ffffdc08d48 in call_dialog_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:129
#13 0x6ffffdc0b13b in WINPROC_CallDlgProcW Z:\home\bernhard\wine\dlls\user32\winproc.c:948
#14 0x6ffffdbcf528 in USER_DefDlgProc Z:\home\bernhard\wine\dlls\user32\defdlg.c:372
#15 0x6ffffdbcf7b4 in DefDlgProcW Z:\home\bernhard\wine\dlls\user32\defdlg.c:438
#16 0x6ffffdc08c2a in call_window_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:108
#17 0x6ffffdc0ac43 in dispatch_win_proc_params Z:\home\bernhard\wine\dlls\user32\winproc.c:725
#18 0x6ffffdbf179c in dispatch_send_message Z:\home\bernhard\wine\dlls\user32\message.c:580
#19 0x6ffffdbf32ee in SendMessageW Z:\home\bernhard\wine\dlls\user32\message.c:599
#20 0x6ffffdbd2d1a in DIALOG_CreateIndirect Z:\home\bernhard\wine\dlls\user32\dialog.c:676
#21 0x6ffffdbd4d1c in DialogBoxIndirectParamW Z:\home\bernhard\wine\dlls\user32\dialog.c:899
#22 0x6ffffd6692a7 in PrintDlgW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:2546
#23 0x000140007f9b in DIALOG_FilePrinterSetup Z:\home\bernhard\wine\programs\notepad\dialog.c:1019
#24 0x00014000e118 in NOTEPAD_WndProc Z:\home\bernhard\wine\programs\notepad\main.c:640
#25 0x6ffffdc08c2a in call_window_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:108
#26 0x6ffffdc0ac43 in dispatch_win_proc_params Z:\home\bernhard\wine\dlls\user32\winproc.c:725
#27 0x6ffffdbf1850 in dispatch_message Z:\home\bernhard\wine\dlls\user32\message.c:854
#28 0x6ffffdbf3afc in DispatchMessageW Z:\home\bernhard\wine\dlls\user32\message.c:940
#29 0x00014000c4ef in WinMain Z:\home\bernhard\wine\programs\notepad\main.c:888
#30 0x00014000ea3e in main+0x20e (C:\x86_64\notepad.exe_asan.exe+0x14000ea3e)
#31 0x00014000e75a in mainCRTStartup Z:\home\bernhard\wine\dlls\msvcrt\crt_main.c:58
#32 0x6fffffa98d58 in BaseThreadInitThunk Z:\home\bernhard\wine\dlls\kernel32\thread.c:61
#33 0x6fffffc95afa (C:\windows\system32\ntdll.dll+0x170055afa)
0x7eeab5c60290 is located 0 bytes inside of 2-byte region [0x7eeab5c60290,0x7eeab5c60292)
freed by thread T0 here:
#0 0x6ffffa809ff1 in free+0x81 (C:\x86_64\libclang_rt.asan_dynamic-x86_64.dll+0x180049ff1)
#1 0x6ffffeb1563c in free_locinfo Z:\home\bernhard\wine\dlls\msvcrt\locale.c:1071
#2 0x6ffffeb1591a in update_thread_locale Z:\home\bernhard\wine\dlls\msvcrt\locale.c:611
#3 0x6ffffeb1a301 in setlocale Z:\home\bernhard\wine\dlls\msvcrt\locale.c:2085
#4 0x6ffffa1bf890 in PSDRV_ParsePPD Z:\home\bernhard\wine\dlls\wineps.drv\ppd.c:887
#5 0x6ffffa1bc0b7 in PSDRV_FindPrinterInfo Z:\home\bernhard\wine\dlls\wineps.drv\init.c:575
#6 0x6ffffa1b66b1 in DrvDocumentPropertySheets Z:\home\bernhard\wine\dlls\wineps.drv\driver.c:491
#7 0x6ffffc60b314 in DocumentPropertiesW Z:\home\bernhard\wine\dlls\winspool.drv\info.c:1854
#8 0x6ffffc611f97 in OpenPrinter2W Z:\home\bernhard\wine\dlls\winspool.drv\info.c:2057
#9 0x6ffffd666153 in PRINTDLG_ChangePrinterW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:1298
#10 0x6ffffd66786d in PRINTDLG_WMInitDialogW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:1660
#11 0x6ffffd667987 in PrintDlgProcW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:2126
#12 0x6ffffdc08d48 in call_dialog_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:129
#13 0x6ffffdc0b13b in WINPROC_CallDlgProcW Z:\home\bernhard\wine\dlls\user32\winproc.c:948
#14 0x6ffffdbcf528 in USER_DefDlgProc Z:\home\bernhard\wine\dlls\user32\defdlg.c:372
#15 0x6ffffdbcf7b4 in DefDlgProcW Z:\home\bernhard\wine\dlls\user32\defdlg.c:438
#16 0x6ffffdc08c2a in call_window_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:108
#17 0x6ffffdc0ac43 in dispatch_win_proc_params Z:\home\bernhard\wine\dlls\user32\winproc.c:725
#18 0x6ffffdbf179c in dispatch_send_message Z:\home\bernhard\wine\dlls\user32\message.c:580
#19 0x6ffffdbf32ee in SendMessageW Z:\home\bernhard\wine\dlls\user32\message.c:599
#20 0x6ffffdbd2d1a in DIALOG_CreateIndirect Z:\home\bernhard\wine\dlls\user32\dialog.c:676
#21 0x6ffffdbd4d1c in DialogBoxIndirectParamW Z:\home\bernhard\wine\dlls\user32\dialog.c:899
#22 0x6ffffd6692a7 in PrintDlgW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:2546
#23 0x000140007f9b in DIALOG_FilePrinterSetup Z:\home\bernhard\wine\programs\notepad\dialog.c:1019
#24 0x00014000e118 in NOTEPAD_WndProc Z:\home\bernhard\wine\programs\notepad\main.c:640
#25 0x6ffffdc08c2a in call_window_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:108
#26 0x6ffffdc0ac43 in dispatch_win_proc_params Z:\home\bernhard\wine\dlls\user32\winproc.c:725
#27 0x6ffffdbf1850 in dispatch_message Z:\home\bernhard\wine\dlls\user32\message.c:854
previously allocated by thread T0 here:
#0 0x6ffffa80a111 in malloc+0x81 (C:\x86_64\libclang_rt.asan_dynamic-x86_64.dll+0x18004a111)
#1 0x6ffffeb154f9 in init_category_name Z:\home\bernhard\wine\dlls\msvcrt\locale.c:474
#2 0x6ffffeb18ad9 in create_locinfo Z:\home\bernhard\wine\dlls\msvcrt\locale.c:1930
#3 0x6ffffeb1a170 in setlocale Z:\home\bernhard\wine\dlls\msvcrt\locale.c:2054
#4 0x6ffffa1bf8c9 in PSDRV_ParsePPD Z:\home\bernhard\wine\dlls\wineps.drv\ppd.c:890
#5 0x6ffffa1bc0b7 in PSDRV_FindPrinterInfo Z:\home\bernhard\wine\dlls\wineps.drv\init.c:575
#6 0x6ffffa1b66b1 in DrvDocumentPropertySheets Z:\home\bernhard\wine\dlls\wineps.drv\driver.c:491
#7 0x6ffffc60b314 in DocumentPropertiesW Z:\home\bernhard\wine\dlls\winspool.drv\info.c:1854
#8 0x6ffffc611f97 in OpenPrinter2W Z:\home\bernhard\wine\dlls\winspool.drv\info.c:2057
#9 0x6ffffd666153 in PRINTDLG_ChangePrinterW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:1298
#10 0x6ffffd66786d in PRINTDLG_WMInitDialogW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:1660
#11 0x6ffffd667987 in PrintDlgProcW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:2126
#12 0x6ffffdc08d48 in call_dialog_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:129
#13 0x6ffffdc0b13b in WINPROC_CallDlgProcW Z:\home\bernhard\wine\dlls\user32\winproc.c:948
#14 0x6ffffdbcf528 in USER_DefDlgProc Z:\home\bernhard\wine\dlls\user32\defdlg.c:372
#15 0x6ffffdbcf7b4 in DefDlgProcW Z:\home\bernhard\wine\dlls\user32\defdlg.c:438
#16 0x6ffffdc08c2a in call_window_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:108
#17 0x6ffffdc0ac43 in dispatch_win_proc_params Z:\home\bernhard\wine\dlls\user32\winproc.c:725
#18 0x6ffffdbf179c in dispatch_send_message Z:\home\bernhard\wine\dlls\user32\message.c:580
#19 0x6ffffdbf32ee in SendMessageW Z:\home\bernhard\wine\dlls\user32\message.c:599
#20 0x6ffffdbd2d1a in DIALOG_CreateIndirect Z:\home\bernhard\wine\dlls\user32\dialog.c:676
#21 0x6ffffdbd4d1c in DialogBoxIndirectParamW Z:\home\bernhard\wine\dlls\user32\dialog.c:899
#22 0x6ffffd6692a7 in PrintDlgW Z:\home\bernhard\wine\dlls\comdlg32\printdlg.c:2546
#23 0x000140007f9b in DIALOG_FilePrinterSetup Z:\home\bernhard\wine\programs\notepad\dialog.c:1019
#24 0x00014000e118 in NOTEPAD_WndProc Z:\home\bernhard\wine\programs\notepad\main.c:640
#25 0x6ffffdc08c2a in call_window_proc Z:\home\bernhard\wine\dlls\user32\winproc.c:108
#26 0x6ffffdc0ac43 in dispatch_win_proc_params Z:\home\bernhard\wine\dlls\user32\winproc.c:725
#27 0x6ffffdbf1850 in dispatch_message Z:\home\bernhard\wine\dlls\user32\message.c:854
SUMMARY: AddressSanitizer: heap-use-after-free Z:\home\bernhard\wine\dlls\msvcrt\locale.c:351 in locale_to_sname
Shadow bytes around the buggy address:
0x7eeab5c60000: fa fa 00 00 fa fa 00 06 fa fa 00 fa fa fa 00 00
0x7eeab5c60080: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x7eeab5c60100: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x7eeab5c60180: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x7eeab5c60200: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
=>0x7eeab5c60280: fa fa[fd]fa fa fa fd fa fa fa fd fa fa fa fd fa
0x7eeab5c60300: fa fa 02 fa fa fa 04 fa fa fa 02 fa fa fa 04 fa
0x7eeab5c60380: fa fa 02 fa fa fa 04 fa fa fa 02 fa fa fa 04 fa
0x7eeab5c60400: fa fa 02 fa fa fa 04 fa fa fa 00 fa fa fa fd fd
0x7eeab5c60480: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
0x7eeab5c60500: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==300==ABORTING
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6787