Skip to content

fix bug in super.Context.LookupByValue by copying parameter#7046

Merged
nwt merged 1 commit into
mainfrom
LookupTypeValue-copy-param
Jun 10, 2026
Merged

fix bug in super.Context.LookupByValue by copying parameter#7046
nwt merged 1 commit into
mainfrom
LookupTypeValue-copy-param

Conversation

@nwt

@nwt nwt commented Jun 10, 2026

Copy link
Copy Markdown
Member

LookupByValue caches its parameter, a byte slice, in the context, so if the backing array is later modified through another reference, the cached value changes. This can cause LookupTypeValue to return an incorrect result since it returns these cached values. Fix this in LookupByValue by caching a copy of the parameter.

LookupByValue caches its parameter, a byte slice, in the context, so if
the backing array is later modified through another reference, the
cached value changes.  This can cause LookupTypeValue to return an
incorrect result since it returns these cached values.  Fix this in
LookupByValue by caching a copy of the paramter.
@nwt nwt requested a review from a team June 10, 2026 19:22
@nwt nwt merged commit 39aa91a into main Jun 10, 2026
2 checks passed
@nwt nwt deleted the LookupTypeValue-copy-param branch June 10, 2026 20:02
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