-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
converting between struct types with different struct tags breaks #801
Labels
bug
Something isn't working
Comments
mvdan
changed the title
Struct cast issue. Text in back quotes mumbles logic of garble?
converting between struct types with different struct tags breaks
Nov 12, 2023
Thanks for filing this bug - we've had a TODO about this edge case for some time, but you're the first one to run into the issue in practice :) Lines 237 to 239 in 5e80f12
|
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Nov 12, 2023
This was a long standing TODO, and a user finally ran into it. The fix isn't terribly straightforward, but I'm pretty happy with it. Add a test case where the same struct field is identical with no tag, with the "tagged1" json tag, and again with "tagged2". While here, we add a test case for a regular named field too. Fixes burrowers#801.
mvdan
added a commit
to mvdan/garble-fork
that referenced
this issue
Nov 12, 2023
This was a long standing TODO, and a user finally ran into it. The fix isn't terribly straightforward, but I'm pretty happy with it. Add a test case where the same struct field is identical with no tag, with the "tagged1" json tag, and again with "tagged2". While here, we add a test case for a regular named field too. Fixes burrowers#801.
pagran
pushed a commit
that referenced
this issue
Nov 13, 2023
This was a long standing TODO, and a user finally ran into it. The fix isn't terribly straightforward, but I'm pretty happy with it. Add a test case where the same struct field is identical with no tag, with the "tagged1" json tag, and again with "tagged2". While here, we add a test case for a regular named field too. Fixes #801.
fix works :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Garble and Go are you using?
Faced struct cast issue with
golang.org/x/crypto v0.14.0
ssh moduleIt uses two structs:
expected that they are "garbled" identically, but
Data
turns togarbled1
andgarbled2
.Since in new ssh code used cast
pongMsg(pingMsg)
build fails with obvious error:1: cannot convert kmohymSBLtRj (variable of type pingMsg) to type wWObn1U
During test founded this.
Example1. Builds and works fine
turns to
Example2. Errors similar to ssh
turns to
Text in back quotes mumbles logic of garble?
The text was updated successfully, but these errors were encountered: