Skip to content

[Wasm] AOT support for threading-enabled runtime #70489

@jeromelaban

Description

@jeromelaban

Description

Building AOT images with threading enabled is failing.

Reproduction Steps

When building AOT images with threading enabled, the following lines:

#ifndef DISABLE_THREADS
monoeg_g_setenv ("MONO_THREADS_SUSPEND", "coop", 0);
monoeg_g_setenv ("MONO_SLEEP_ABORT_LIMIT", "5000", 0);
#endif

cause the following error:

`not compiled with safepoints`

@lambdageek mentioned that the environment needs to have MONO_THREADS_SUSPEND=coop set before invoking the compiler, but the compilation fails with the following:

* Assertion at /__w/Uno.DotnetRuntime.WebAssembly/Uno.DotnetRuntime.WebAssembly/runtime/src/mono/mono/mini/mini.c:2752, condition `mini_safepoints_enabled ()' not met

mini_safepoints_enabled (void)
{
#if defined (TARGET_WASM)
return FALSE;
#else
return TRUE;
#endif

Expected behavior

Compilation succeeds.

Actual behavior

See above.

Regression?

No

Known Workarounds

None

Configuration

213b4d4

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions