mrlitany / libjingle

Automatically exported from code.google.com/p/libjingle
0 stars 0 forks source link

Thread creating problem #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Thanks for reporting this issue. Libjingle doesn't support 64-bit right now. 
We'll look into it later. Set low priority for now.

Original comment by jun...@google.com on 16 Nov 2011 at 7:38