79325: [PATCH 1/3] kernel32; ntdll; server: store sharing state for named pipes (resend)

buildbot at kegel.com buildbot at kegel.com
Mon Sep 26 07:30:36 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

For more info about this message, see http://wiki.winehq.org/BuildBot

The Buildbot has detected a failed build on builder runtests-heaptest while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-heaptest/builds/46 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed shell_3

Errors:
* Call to xpconnect wrapped JSObject produced this error:  *
* Call to xpconnect wrapped JSObject produced this error:  *
alarum: failed command was ../../../wine oleaut32_test.exe.so olepicture.c 
fixme:ole:OleLoadPictureEx (0x11d3c0,60,1,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=100,y=100,f=0,0x34fcac), partially implemented.
fixme:ole:OleLoadPictureEx (0x11c368,50,1,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=100,y=100,f=0,0x34fcd8), partially implemented.
fixme:ole:OLEPictureImpl_Load Unknown magic 0001, 50 read bytes:
01 00 09 00 00 03 19 00 01 00 
09 00 00 03 19 00 00 00 00 00 
0d 00 00 00 00 00 0d 00 00 00 
32 0a 16 00 0b 00 04 00 00 00 
54 65 73 74 03 00 05 00 08 00 
0c 00 03 00 00 00 00 00 
err:ole:OleLoadPictureEx IPersistStream_Load failed
fixme:ole:OleLoadPictureEx (0x11c4a8,244,1,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=10,y=10,f=0,0x34fcb0), partially implemented.
err:ole:OLEPictureImpl_Invoke riid was {7bf80981-bf32-101a-8bbb-00aa00300cab} instead of IID_NULL
err:ole:OLEPictureImpl_Invoke riid was {00000000-0000-0000-c000-000000000046} instead of IID_NULL
err:ole:OLEPictureImpl_Invoke param count for DISPATCH_PROPERTYPUT was 0 instead of 1
err:ole:OLEPictureImpl_Invoke null pDispParams not allowed
err:ole:OLEPictureImpl_Invoke null pDispParams not allowed
err:ole:OLEPictureImpl_Invoke null pDispParams not allowed
err:ole:OLEPictureImpl_Invoke invalid dispid 0x2 or wFlags 0x1
err:ole:OLEPictureImpl_Invoke invalid dispid 0xdeadbeef or wFlags 0x2
err:ole:OLEPictureImpl_Invoke param count for DISPATCH_PROPERTYGET was 1 instead of 0
err:ole:OLEPictureImpl_Invoke param count for DISPATCH_PROPERTYGET was 1 instead of 0
fixme:ole:OLEPictureImpl_Render Not quite correct implementation of rendering icons...
olepicture.c:696: Test failed: Color at 5,5 should have changed, but still was 0x28CD86
make: *** [olepicture.ok] Error 1

-------------- next part --------------
From: Bernhard Loos <bernhardloos at googlemail.com>
Subject: [PATCH 1/3] kernel32, ntdll, server: store sharing state for named pipes (resend)
Message-Id: <CAOB12PX1AVt=BCzwtgtMarS3SJh_Y_wxDeAjDNbF9NwygKax0A at mail.gmail.com>
Date: Mon, 26 Sep 2011 13:57:15 +0200

---
 dlls/kernel32/sync.c           |   15 ++++++++-------
 dlls/ntdll/file.c              |    1 +
 include/wine/server_protocol.h |    6 ++++--
 server/named_pipe.c            |    2 ++
 server/protocol.def            |    1 +
 server/request.h               |   13 +++++++------
 server/trace.c                 |    1 +
 7 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
index 3f627a4..9630258 100644
--- a/dlls/kernel32/sync.c
+++ b/dlls/kernel32/sync.c
@@ -1346,7 +1346,7 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
     HANDLE handle;
     UNICODE_STRING nt_name;
     OBJECT_ATTRIBUTES attr;
-    DWORD access, options;
+    DWORD access, options, sharing;
     BOOLEAN pipe_type, read_mode, non_block;
     NTSTATUS status;
     IO_STATUS_BLOCK iosb;
@@ -1379,15 +1379,15 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
     switch(dwOpenMode & 3)
     {
     case PIPE_ACCESS_INBOUND:
-        options = FILE_PIPE_INBOUND;
+        sharing = FILE_SHARE_WRITE;
         access  = GENERIC_READ;
         break;
     case PIPE_ACCESS_OUTBOUND:
-        options = FILE_PIPE_OUTBOUND;
+        sharing = FILE_SHARE_READ;
         access  = GENERIC_WRITE;
         break;
     case PIPE_ACCESS_DUPLEX:
-        options = FILE_PIPE_FULL_DUPLEX;
+        sharing = FILE_SHARE_READ | FILE_SHARE_WRITE;
         access  = GENERIC_READ | GENERIC_WRITE;
         break;
     default:
@@ -1395,6 +1395,7 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
         return INVALID_HANDLE_VALUE;
     }
     access |= SYNCHRONIZE;
+    options = 0;
     if (dwOpenMode & FILE_FLAG_WRITE_THROUGH) options |= FILE_WRITE_THROUGH;
     if (!(dwOpenMode & FILE_FLAG_OVERLAPPED)) options |= FILE_SYNCHRONOUS_IO_NONALERT;
     pipe_type = (dwPipeMode & PIPE_TYPE_MESSAGE) ? TRUE : FALSE;
@@ -1406,7 +1407,7 @@ HANDLE WINAPI CreateNamedPipeW( LPCWSTR name, DWORD dwOpenMode,
 
     SetLastError(0);
 
-    status = NtCreateNamedPipeFile(&handle, access, &attr, &iosb, 0,
+    status = NtCreateNamedPipeFile(&handle, access, &attr, &iosb, sharing,
                                    FILE_OVERWRITE_IF, options, pipe_type,
                                    read_mode, non_block, nMaxInstances,
                                    nInBufferSize, nOutBufferSize, &timeout);
@@ -1847,8 +1848,8 @@ BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
                   GetCurrentProcessId(), ++index);
         RtlInitUnicodeString(&nt_name, name);
         status = NtCreateNamedPipeFile(&hr, GENERIC_READ | SYNCHRONIZE, &attr, &iosb,
-                                       0, FILE_OVERWRITE_IF,
-                                       FILE_SYNCHRONOUS_IO_NONALERT | FILE_PIPE_INBOUND,
+                                       FILE_SHARE_WRITE, FILE_OVERWRITE_IF,
+                                       FILE_SYNCHRONOUS_IO_NONALERT,
                                        FALSE, FALSE, FALSE, 
                                        1, size, size, &timeout);
         if (status)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 4d49956..278da5d 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2781,6 +2781,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
         req->attributes = attr->Attributes;
         req->rootdir = wine_server_obj_handle( attr->RootDirectory );
         req->options = options;
+        req->sharing = sharing;
         req->flags = 
             (pipe_type) ? NAMED_PIPE_MESSAGE_STREAM_WRITE : 0 |
             (read_mode) ? NAMED_PIPE_MESSAGE_STREAM_READ  : 0 |
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index ee438b4..9db7f78 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -3030,13 +3030,15 @@ struct create_named_pipe_request
     unsigned int   attributes;
     obj_handle_t   rootdir;
     unsigned int   options;
+    unsigned int   sharing;
     unsigned int   maxinstances;
     unsigned int   outsize;
     unsigned int   insize;
+    char __pad_44[4];
     timeout_t      timeout;
     unsigned int   flags;
     /* VARARG(name,unicode_str); */
-    char __pad_52[4];
+    char __pad_60[4];
 };
 struct create_named_pipe_reply
 {
@@ -5635,6 +5637,6 @@ union generic_reply
     struct set_suspend_context_reply set_suspend_context_reply;
 };
 
-#define SERVER_PROTOCOL_VERSION 425
+#define SERVER_PROTOCOL_VERSION 426
 
 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 02ecbde..870146e 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -92,6 +92,7 @@ struct named_pipe
 {
     struct object       obj;         /* object header */
     unsigned int        flags;
+    unsigned int        sharing;
     unsigned int        maxinstances;
     unsigned int        outsize;
     unsigned int        insize;
@@ -984,6 +985,7 @@ DECL_HANDLER(create_named_pipe)
         pipe->maxinstances = req->maxinstances;
         pipe->timeout = req->timeout;
         pipe->flags = req->flags;
+        pipe->sharing = req->sharing;
     }
     else
     {
diff --git a/server/protocol.def b/server/protocol.def
index 123f16a..71524a4 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2186,6 +2186,7 @@ enum message_type
     unsigned int   attributes;   /* object attributes */
     obj_handle_t   rootdir;      /* root directory */
     unsigned int   options;
+    unsigned int   sharing;
     unsigned int   maxinstances;
     unsigned int   outsize;
     unsigned int   insize;
diff --git a/server/request.h b/server/request.h
index d2ca2f6..2d4528a 100644
--- a/server/request.h
+++ b/server/request.h
@@ -1477,12 +1477,13 @@ C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, access) == 12 );
 C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, attributes) == 16 );
 C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, rootdir) == 20 );
 C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, options) == 24 );
-C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, maxinstances) == 28 );
-C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, outsize) == 32 );
-C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, insize) == 36 );
-C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, timeout) == 40 );
-C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, flags) == 48 );
-C_ASSERT( sizeof(struct create_named_pipe_request) == 56 );
+C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, sharing) == 28 );
+C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, maxinstances) == 32 );
+C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, outsize) == 36 );
+C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, insize) == 40 );
+C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, timeout) == 48 );
+C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, flags) == 56 );
+C_ASSERT( sizeof(struct create_named_pipe_request) == 64 );
 C_ASSERT( FIELD_OFFSET(struct create_named_pipe_reply, handle) == 8 );
 C_ASSERT( sizeof(struct create_named_pipe_reply) == 16 );
 C_ASSERT( FIELD_OFFSET(struct get_named_pipe_info_request, handle) == 12 );
diff --git a/server/trace.c b/server/trace.c
index 37ea216..670958a 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2607,6 +2607,7 @@ static void dump_create_named_pipe_request( const struct create_named_pipe_reque
     fprintf( stderr, ", attributes=%08x", req->attributes );
     fprintf( stderr, ", rootdir=%04x", req->rootdir );
     fprintf( stderr, ", options=%08x", req->options );
+    fprintf( stderr, ", sharing=%08x", req->sharing );
     fprintf( stderr, ", maxinstances=%08x", req->maxinstances );
     fprintf( stderr, ", outsize=%08x", req->outsize );
     fprintf( stderr, ", insize=%08x", req->insize );



More information about the wine-tests-results mailing list