Re: [Mingw-w64-public] __native_startup_state & __native_startup_lock in __tmainCRTStartup()

2025-01-04 Thread LIU Hao
在 2025-01-05 01:46, Pali Rohár 写道: But the mentioned comment applies also for the main application EXE module? Or only for DLL libraries? Because I have feeling that only for DLL libraries... It's called both in 'dll_dllmain.cpp' and 'exe_common.inl'. The latter implements all the four variant

Re: [Mingw-w64-public] Patch for incorrect heap function declarations in winnt.h

2025-01-04 Thread LIU Hao
在 2025-01-05 03:09, Duncan Ogilvie 写道: Yeah looks great to me, thanks! Thanks. pushed now. -- Best regards, LIU Hao OpenPGP_signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge

Re: [Mingw-w64-public] Patch for incorrect heap function declarations in winnt.h

2025-01-04 Thread Duncan Ogilvie
Yeah looks great to me, thanks! On Sat, 4 Jan 2025 at 14:22, LIU Hao wrote: > > 在 2025-01-04 20:24, Duncan Ogilvie 写道: > >> Is there a reason why you changed the return type of > >> `RtlMultipleAllocateHeap` from `DWORD` to > > `ULONG`? They are the same type and interchangeable. > > > > No reas

Re: [Mingw-w64-public] __native_startup_state & __native_startup_lock in __tmainCRTStartup()

2025-01-04 Thread Pali Rohár
On Sunday 05 January 2025 01:25:02 LIU Hao wrote: > 在 2025-01-05 01:02, Pali Rohár 写道: > > Hello, > > > > Do you know that is the purpose of __native_startup_state and > > __native_startup_lock variables used in __tmainCRTStartup() static > > function which is called only from the EXE application

Re: [Mingw-w64-public] __native_startup_state & __native_startup_lock in __tmainCRTStartup()

2025-01-04 Thread LIU Hao
在 2025-01-05 01:02, Pali Rohár 写道: Hello, Do you know that is the purpose of __native_startup_state and __native_startup_lock variables used in __tmainCRTStartup() static function which is called only from the EXE application entry point? I tried to find some documentation, but there is nothing

[Mingw-w64-public] __native_startup_state & __native_startup_lock in __tmainCRTStartup()

2025-01-04 Thread Pali Rohár
Hello, Do you know that is the purpose of __native_startup_state and __native_startup_lock variables used in __tmainCRTStartup() static function which is called only from the EXE application entry point? I tried to find some documentation, but there is nothing neither on Microsoft webpage and nei

Re: [Mingw-w64-public] Patch for incorrect heap function declarations in winnt.h

2025-01-04 Thread LIU Hao
在 2025-01-04 20:24, Duncan Ogilvie 写道: Is there a reason why you changed the return type of `RtlMultipleAllocateHeap` from `DWORD` to `ULONG`? They are the same type and interchangeable. No reason, just found all the other definitions used ULONG (since DWORD generally isn't available in the ke

Re: [Mingw-w64-public] getmainargs changes

2025-01-04 Thread Pali Rohár
Interesting... What is not clear is if the research team reported this bug to Microsoft and if Microsoft is going to address this issue at some level, or at least document best practices what should affected applications do. Anyway, Has somebody checked Visual C runtime and UCRT source code if the

Re: [Mingw-w64-public] Patch for incorrect heap function declarations in winnt.h

2025-01-04 Thread Duncan Ogilvie
> Is there a reason why you changed the return type of > `RtlMultipleAllocateHeap` from `DWORD` to `ULONG`? They are the same type and interchangeable. No reason, just found all the other definitions used ULONG (since DWORD generally isn't available in the kernel/ntdll context). Feel free to remo