Skip to content

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

Closed

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

Activity

  1. added
    Known Build Error
    on Mar 23, 2026
  2. added
    untriaged
    on Mar 23, 2026
  3. dotnet-policy-service commented on Mar 23, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @karelz, @dotnet/ncl
    See info in area-owners.md if you want to be subscribed.

  4. removed
    untriaged
    on Mar 23, 2026
  5. locked and limited conversation to collaborators on Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build Errorarea-System.Net.Http

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions