Skip to content

[mono] Mono coredumps when built with _FORTIFY_SOURCE=2 forced. #82269

@ayakael

Description

@ayakael

Description

Building runtime on current edge of Alpine Linux using mono generates a broken runtime.

Reproduction Steps

On Alpine Linux Edge, build a mono-flavored runtime, and try to execute ./dotnet build. Core dump will occur.

Expected behavior

Good execution

Actual behavior

Coredump

Regression?

Bug occurs on dotnet6 as well.

Known Workarounds

Undefining _FORTIFY_SOURCE in src/mono/mono/utils/mono-thread-coop.c

Configuration

7.0.103 and 6.0.114
Alpine Linux Edge
s390x and ppc64le, presumably any runtime built with mono-flavor

Other information

Running dotnet build through gdb yields the following:

0x000003fffd70fc8e in ?? () at /home/build/aports/community/dotnet7-build/src/dotnet-v7.0.103/src/runtime/artifacts/source-build/self/src/src/mono/mono/utils/mono-threads-coop.c:123 from /home/build/aports/community/dotnet7-build/src/dotnet-bunny-12/release/shared/Microsoft.NETCore.App/7.0.3/libcoreclr.so
123             g_assert (mono_threads_is_blocking_transition_enabled ());

Runtimes built previously still work, so something occurs during build for runtime to fail with src/mono/mono/utils/mono-threads-coop.c on line 123.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions