Skip to content

Browser WASM collectible ALC test has no loadable assembly path #134001

Description

@lewing

Description

Async2CollectibleAlc.TestEntryPoint fails on browser-Wasm CoreCLR because the host does not expose a usable assembly path for loading a second copy into a collectible AssemblyLoadContext.

Reproduction Steps

Build browser-Wasm CoreCLR and run:

src/tests/async/collectible-alc/collectible-alc.cs
Async2CollectibleAlc.TestEntryPoint

The failure reproduces in both interpreter and ReadyToRun execution.

Expected behavior

The test should locate a loadable copy of collectible-alc.dll, load it into a collectible AssemblyLoadContext, execute the runtime-async method, unload the context, and pass.

Actual behavior

Assembly.GetExecutingAssembly().Location is empty in the browser host, and AssemblyLoadContext.LoadFromAssemblyPath fails before the runtime-async assertions execute:

System.ArgumentException: Path "" is not an absolute path. (Parameter 'assemblyPath')
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
   at Async2CollectibleAlc.CallFooAsyncInCollectibleALC(Task task)

Regression?

Unknown. This was exposed while enabling the full src/tests/async runner for browser CoreCLR.

Known Workarounds

Skip only Async2CollectibleAlc.TestEntryPoint when PlatformDetection.IsWasm is true. Preserve native-platform coverage.

Configuration

  • Browser CoreCLR
  • WebAssembly
  • Checked runtime, Release libraries
  • Interpreter and ReadyToRun execution under Node

Other information

A complete fix needs a browser-host-supported mechanism for supplying the test assembly bytes or a loadable path to the collectible ALC.

Note

This issue was generated with GitHub Copilot assistance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions