Skip to content

[BUG]: Unhandled exception when DebugInformationManager is constructed #1359

@afmg-nmoesus

Description

@afmg-nmoesus

Describe the bug

Dear ILGPU-Team,
I encountered an UnauthorizedAccessException in ILGPU.Frontend.DebugInformation.DebugInformationManager..ctor when creating the ILGPU.Context, see stacktrace below.

It seems like the DebugInformationManager is created regardless of the debug level. Is this necessary? It should probably not prevent the use of ILGPU when the user has limited access to the working directory of the application.

Environment

  • ILGPU version: 1.5.1
  • .NET version: .NET 9
  • Operating system: Windows
  • Hardware: unknown

Steps to reproduce

Create ILGPU.Context with limited access to the applications working directory.

Expected behavior

In a production build, it should be possible to create the ILGPU.Context regardless of the directory access level of the working directory.

Additional context

Exception message:
(-2147024891) Access to the path '...' is denied.

Stacktrace:
at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator1.Init()
at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions) at ILGPU.Frontend.DebugInformation.DebugInformationManager.RegisterLookupDirectory(String directory) at ILGPU.Frontend.DebugInformation.DebugInformationManager..ctor() at ILGPU.Context..ctor(Builder builder, ImmutableArray1 devices)
at ILGPU.Context.Builder.ToContext()
at ILGPU.Context.Create(Action`1 buildingCallback)
[...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions