"winetest" throws an exception after the unsuccessful send operation

Saulius Krasuckas saulius2 at ar.fi.lt
Wed Aug 18 03:50:29 CDT 2004


I am getting this after all the tests were performed, network transfer of
the report file was over and after the http server has responded (with
some error-message) in Wine:

err:win:WIN_FindWndPtr window 0x10022 belongs to other process
err:win:WIN_FindWndPtr window 0x10022 belongs to other process
wine: Unhandled exception (thread 000b), starting debugger...
fixme:console:SetConsoleCtrlHandler (0x4067a644,1) - no error checking or testing yet
WineDbg starting on pid 0xa
Unhandled exception: page fault on read access to 0xffe5024c in 32-bit code (0x40045cf2).
In 32 bit mode.
0x40045cf2 pthread_mutex_lock in libpthread.so.0: movl  0xc(%edi),%eax
Wine-dbg>bt
Backtrace:
=>1 0x40045cf2 pthread_mutex_lock+0x12 in libpthread.so.0 (0x40c0fe28)
  2 0x42075bea free+0x9a in libc.so.6 (0x40c0fe48)
  3 0x4065753a send_file+0x362(name=0x781e4a80) [send.c:217] in winetest (0x40c0fe78)
  4 0x40656f2e .L256+0xde in winetest (0x40c0fe9c)
  5 0x4065511c __wine_exe_main+0x11c in winetest (0x40c0ff2c)
  6 0x403a101a start_process+0xf2(arg=0x0) [process.c:995] in kernel32 (0x40c0fff4)
  7 0x4002a8cd wine_switch_to_stack+0x11 in libwine.so.1 (0x00000000)


And the error message in the message-box looks like this:

Can't submit logfile '/tmp/rescVOMCP'. Server response: <!DOCTYPE HTML 
PUBLIC"...
...
<title>500 Internal Server Error</title>
...
<p>The server encountered an internal error or misconfiguration and was 
unable to complete your request.</p>
...
<address>Apache 2.0.40 Server at test.winehq.org Port 80</address>
<body><html>


Back to the code.  Excerpts from the programs/winetest/send.c:

>     unsigned char *buffer;
...
>     buffer = xmalloc (BUFLEN + 1);
...
>     if (ret) {
>         buffer[total] = 0;
>         str = strstr (buffer, "\r\n\r\n");
>         if (str) buffer = str + 4;
>         report (R_ERROR, "Can't submit logfile '%s'. "
>                 "Server response: %s", name, buffer);
>     }
>     free (buffer);

Is it OK to try to free the modified "buffer" ptr?  I thought we should
preserve its value.  We can use the "str" instead of the "buffer".  I've
tried such mod and it worked fine in my case:


--- wine/programs/winetest/send.c       6 Jul 2004 21:03:22 -0000       1.12
+++ wine/programs/winetest/send.c       18 Aug 2004 07:41:24 -0000
@@ -209,9 +209,9 @@
     if (ret) {
         buffer[total] = 0;
         str = strstr (buffer, "\r\n\r\n");
-        if (str) buffer = str + 4;
+        str = (str)?(str + 4):(buffer);
         report (R_ERROR, "Can't submit logfile '%s'. "
-                "Server response: %s", name, buffer);
+                "Server response: %s", name, str);
     }
     free (buffer);
     return ret;



Should I submit it to the wine-patches or I am wrong with it?




More information about the wine-devel mailing list