What steps will reproduce the problem?
1. compile libjingle on windows platform with default function calling
convention __fastcall
2. try create and run talk_base::Thread
What is the expected output? What do you see instead?
Program crashes.
What version of the product are you using? On what operating system?
libjingle-0.5.1
Please provide any additional information below.
Problem in this code
thread_ = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)PreRun, init, flags,NULL);
Windows function CreateThread expect that PreRun have __stdcall calling
convention and return DWORD. However, the function PreRun returns void*, which
on a 64-bit platform will have size of 8 bytes. If we use __fastcall calling
convention, parameter will be passed through registers, but not through the
stack. So programs behaviour will be unpredictable and lead to the crash
Original issue reported on code.google.com by cybe...@gmail.com on 18 Jan 2011 at 7:03
Original issue reported on code.google.com by
cybe...@gmail.com
on 18 Jan 2011 at 7:03