Skip to content

Spurious SEHException thrown when debugging a program using ClangSharp on linux #43147

Closed
@DCNick3

Description

@DCNick3

Description

(Also tracked at dotnet/ClangSharp#167)
Running a program as simple as

using ClangSharp.Interop;
class Program
{
    static void Main(string[] args)
    {
        var index = CXIndex.Create();
    }
}

with debugger attached results in a System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. popping out in different places (depends on where do I put a breakpoint). If I put no breakpoint it shows up somewhere in standard library internals.

Program without a debugger runs just fine (which makes think that this is debugger specific issue).

Does not seem to depend on ClangSharp version.

It is reproducible with both Rider and vs code debugger on arch linux and with rider remote debugging connected to debian.

Configuration

dotnet core 3.1.8
arch linux
x86_64

Regression?

Don't really know

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions