Skip to content

Pass the full map buffer size to every TdhGetEventMapInformation call - #2513

Open
John U (jdu2600) wants to merge 1 commit into
microsoft:mainfrom
jdu2600:worktree-fix-map-buffer-size
Open

John U (jdu2600) wants to merge 1 commit into
microsoft:mainfrom
jdu2600:worktree-fix-map-buffer-size

Conversation

@jdu2600

Copy link
Copy Markdown
Contributor

GetManifestForRegisteredProvider passed one buffSize variable by reference to every TdhGetEventMapInformation call. TDH sets it to the bytes it used, so a map larger than the previous one failed with ERROR_INSUFFICIENT_BUFFER and was left out, along with the map attribute of every field that used it.

Microsoft-Windows-DotNETRuntime event 9 (GCSuspendEEStart), before:

<data name="Reason" inType="win:UInt16" />

After:

<data name="Reason" inType="win:UInt16" map="GCSuspendEEReasonMap" />
<valueMap name="GCSuspendEEReasonMap">
  <map value="0x0" message="$(string.map_GCSuspendEEReasonMapSuspendOther)" />
  <map value="0x1" message="$(string.map_GCSuspendEEReasonMapSuspendForGC)" />
  ...

Maps whose entry strings contain inserts (e.g. "Uninitialized (%1)" in DxgKrnl's DXGK_DISPLAYMUX_SUPPORT_LEVEL) are still missing: TDH fails to load them with ERROR_INVALID_PARAMETER, and there is no known supported way to recover them.

🤖 Generated with Claude Code

@jdu2600
John U (jdu2600) requested a review from a team as a code owner November 20, 2026 13:14

@brianrob Brian Robbins (brianrob) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation

Approval Recommended

Reviewed commit 47fe40b5.

PR: #2513

Base: 8ba00fcc2ab6706850b5eb45464b91b83d7c39e7; Head: 47fe40b5d6bbe48a6fddb384e0c326c06776171d

Areas Reviewed

  • TDH map-buffer capacity, native allocation and manifest map references.
  • Windows regression assertions and the legacy comparison helper.
  • No material architecture or dependency change; existing TDH ownership, public APIs and manifest format are preserved.

Areas Requiring Human Review

  • None.

Code Review Feedback

No defects identified in the completed coverage.


Written by Robert Bobby (Brianrob's Code Review Bot).

@brianrob Brian Robbins (brianrob) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@brianrob

Copy link
Copy Markdown
Member

John U (@jdu2600) would you mind rebasing these changes? Thanks.

GetManifestForRegisteredProvider passed one buffSize variable by reference
to every map lookup. TDH sets it to the bytes it used, so a map larger than
the previous one failed with ERROR_INSUFFICIENT_BUFFER and was left out, and
the fields that used it lost their map attribute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants