Skip to content

Fix uninitialized x64 handle in CUtlHandleTable::CreateHandle - #2118

Draft
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:assert-utlhandletable
Draft

sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:assert-utlhandletable

Conversation

@sunzenshen

Copy link
Copy Markdown
Contributor

Description

Fully zero initialize x64 handle that was being partially memcpy'd by a 32-bit source.

Aims to fix this assert:

image

Toolchain

  • Windows MSVC VS2022

@sunzenshen
sunzenshen requested a review from a team September 6, 2026 21:35
@sunzenshen sunzenshen added the Minor bugs Stuff that we might want to document is fixed but doesn't fit elsewhere. No bounty on this category. label Sep 6, 2026
@AdamTadeusz

Copy link
Copy Markdown
Contributor

Is there a reliable way of replicating this assert?

@sunmachine

Copy link
Copy Markdown
Contributor

Same, I can't figure it out. 😭

@sunzenshen

Copy link
Copy Markdown
Contributor Author

Oddly enough it only started showing up on startup for me a couple weeks ago, but you'd think the root cause commit would be earlier than that.

@Rainyan

Rainyan commented Sep 9, 2026

Copy link
Copy Markdown
Member

What does the call stack look like when entering that function? And if you can reproduce the assert fail, what are the input values for the function for that failure case? Also would be curious to know what the ret and ref values are for the assertion failure.

Also, was this in debug build or release build with asserts enabled?

@sunzenshen

Copy link
Copy Markdown
Contributor Author

What does the call stack look like when entering that function? And if you can reproduce the assert fail, what are the input values for the function for that failure case? Also would be curious to know what the ret and ref values are for the assertion failure.

Also, was this in debug build or release build with asserts enabled?

This was in the debug build, but the irony is that after refreshing my CMake cache, I don't see this assert anymore. I'll watch out to see if I encounter this in a different branch.

@sunzenshen
sunzenshen marked this pull request as draft September 9, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor bugs Stuff that we might want to document is fixed but doesn't fit elsewhere. No bounty on this category.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants