bitfaster / JitExplorer

Like compiler explorer, but for .NET JIT.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System.TimeoutException on JitExplorer.Pipe

Symbai opened this issue · comments

Happens with 0.9 and current code releases. The following code throws a TimeoutException:

System.TimeoutException: The operation has timed out.
   at System.IO.Pipes.NamedPipeClientStream.ConnectInternal(Int32 timeout, CancellationToken cancellationToken, Int32 startTime)
   at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout)
   at JitExplorer.Engine.RuntimeDisassembler.CompileJitAndDisassemble(String sourceCode, Config config) in D:\a\JitExplorer\JitExplorer\JitExplorer.Engine\RuntimeDisassembler.cs:line

using var cpipe = new System.IO.Pipes.NamedPipeClientStream(".", "JitExplorer.Pipe", System.IO.Pipes.PipeDirection.InOut, System.IO.Pipes.PipeOptions.None);
try
{
cpipe.Connect(3000);
}
catch
{
p.Kill();
throw;

Code I wanted to JIT

namespace JitExplorer
{
    using System;

    public class Test
    {
    const int bla = 63;
        [Jit.This]
        public static void Execute()
        {
            for (int i = 0; i < 100; i++)
            {
                i = bla + 1;
            }
        }
    }
}