在 2024-08-05 01:18, Pali Rohár 写道:
"Do not declare this callback function with a void return type and cast the function pointer to LPTHREAD_START_ROUTINE when creating the thread. Code that does this is common, but it can crash on 64-bit Windows."
That probably applies exclusively to Itanium, where each register has a Not-a-Thing (NaT) bit. If a program reads a value from a register whose NaT bit is set (probably due to speculative execution) then a fault occurs. Returning zero ensures the result register is not Not-a-Thing.
What about this change? I'm really not sure what this profthr_func() should return. It looks like that its return value is ignored at all.
The change looks good. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public