Skip to content

TrailingHeadersTest.cs: CS4007 ReadOnlySpan<byte> cannot be preserved across await boundary #125952

@matouskozak

Description

@matouskozak

Build Information

Build: 1347491
Leg Name: windows-x64 Release AllSubsets_Mono

TrailingHeadersTest.cs(220,36) uses a ReadOnlySpan<byte> across an await boundary, which is disallowed by the compiler. This is a code defect in the System.Net.Http.WinHttpHandler functional tests.

Build log

Error Message

{
    "ErrorMessage": "error CS4007: (NETCORE_ENGINEERING_TELEMETRY=Build) Instance of type 'System.ReadOnlySpan<byte>' cannot be preserved across 'await' or 'yield' boundary.",
    "BuildRetry": false,
    "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1347491
Error message validated: [error CS4007: (NETCORE_ENGINEERING_TELEMETRY=Build) Instance of type 'System.ReadOnlySpan<byte>' cannot be preserved across 'await' or 'yield' boundary.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 3/23/2026 10:23:25 AM UTC

Report

Build Definition Step Name Console log Pull Request
1347815 dotnet/runtime Build product Log #125948
1347491 dotnet/runtime Build product Log

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
2 2 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions