Skip to content

Conversation

@rvagg
Copy link
Contributor

@rvagg rvagg commented Mar 5, 2025

A bug in #109; many of the unmarshal components just reuse the primary maj, extra, err variables for cr.ReadHeader(), so that when you get to the end and want to use extra to length-check, it's already been overwritten with something else. This doesn't show up in the current tests because int64 happens to block scope and create new variables. But uint64 doesn't, so that's included in the test now and it fails without the fix. I remember hitting this when I was doing the generics work too.

This is the "hard way" (proper way) of fixing it and makes a lot of churn in generated output.

#112 is the easy way of fixing it.

We can debate and pick one.

@Stebalien
Copy link
Collaborator

Let's go with #112. It's the simplest and leads to the least churn.

@Stebalien Stebalien closed this Mar 5, 2025
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