Thank you for the responce<br>
<br>
I tried the following, Please let me know , if more details are required <br>
<br>
- Case 1:<br>
- Stub function is declared in XXXXX_dll.h as <br>
long __stdcall STUB_Add(long, long);<br>
-Stub function is defined in XXXXX_main.c as <br>
long __stdcall STUB_Add(long x, long y)<br>
{<br>
printf ("stub function is called \n");<br>
return 0;<br>
}<br>
<br>
In one Application , I used <br>
LoadLibrary("<a href="http://XXXXX.dll.so">XXXXX.dll.so</a>") - to load the dll<br>
GetProcAddress("") - to get the function pointer<br>
and if I
call the function continuously in a loop of for 1000 times, first 2
calls are success 3rd call is crashed<br>
<br>
In another application , I used <br>
dlopen() - to load the dll<br>
dlsym - to get the function pointer<br>
and if I
call the function continuously in a loop of for 1000 times, then
the I got a crash after 40 - 50 times<br>
<br>
<br>
- Case 2:<br>
- Stub function is declared in XXXXX_dll.h as <br>
long STUB_Add(long, long);<br>
-Stub function is defined in XXXXX_main.c as <br>
long STUB_Add(long x, long y)<br>
{<br>
printf ("stub function is called \n");<br>
return 0;<br>
}<br>
<br>
The first Application (that uses
LoadLibrary(), GetProcAddress ...) is executed without any crash.<br>
The Second application (that uses the
dlopen, dlsym() ..) is giving the same results as in case 1. (i.e
crashing after 40-50 times)<br>
<br>
<br>
<br>
<br>
<br>
<br><div><span class="gmail_quote">On 12/23/05, <b class="gmail_sendername">Alex Villac��s Lasso</b> <<a href="mailto:a_villacis@palosanto.com">a_villacis@palosanto.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ananth M wrote:<br><br>>Hi<br>> I am able to successfully convert the windows dll into .so file and I<br>>am able to call the functions exported by dll from the winelib application.<br>> But if I call those functions from winelib application continuously for
<br>>1000 times , in a loop, then wine is crashing with the following error<br>><br>>err:seh:setup_exception stack overflow 28 bytes in thread 0025<br>><br>> Then I tried calling the stub function itself in the loop (commented
<br>>the code in stub function such that , it wont call the dll function )<br>><br>> Still I am getting the same error.<br>><br>> Can any one faced this problem ?<br>><br>>Can any one help on the same
<br>><br>><br>It seems that there is a mismatch between the stub's and the caller's<br>idea of the stack usage. This mismatch accumulates over the loop until<br>the stack overflows (or underflows). From your symptoms, the prime
<br>suspect would be a stdcall/cdecl mismatch, but more information is<br>needed. Could you please post the declaration and the definition of your<br>stub, and an example of how the caller is calling such function?<br><br>
Alex Villac�s Lasso<br><br></blockquote></div><br>