Example #1
0
        public PosixFuzzerIpc(int shmId, string statusPipeId, string controlPipeId)
        {
            Control = new BinaryReader(new AnonymousPipeClientStream(PipeDirection.In, controlPipeId));
            Status  = new BinaryWriter(new AnonymousPipeClientStream(PipeDirection.Out, statusPipeId));

            shmHandle = Native.shmat(shmId, IntPtr.Zero, 0);
        }
Example #2
0
 /// <summary>
 /// Creates the or open.
 /// </summary>
 private void CreateOrOpen()
 {
     IntPtr hHandle = CreateFileMapping(new IntPtr(-1),
                                         0,
                                         FileMapProtection.PageReadWrite,
                                         0,
                                         Size,
                                         SharedMemoryName);
     _sharedMemoryHandle = new SharedMemoryHandle(hHandle);
     if (_sharedMemoryHandle.IsInvalid)
     {
         throw new InvalidOperationException("Failed to create section object");
     }
 }