-
Notifications
You must be signed in to change notification settings - Fork 18k
documentation: Go internal abi specification document alignment confusion #53223
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
Comments
CC @golang/runtime. |
The abi-internal.md document says that on 32-bit architectures the alignment of In general you will get better and faster answers to questions on a forum rather than the issue tracker. See https://go.dev/wiki/Questions. Closing this issue because there doesn't seem to be a bug here. |
Thank you, @ianlancetaylor, for the response! You were kind enough to chat with me before my presentation at GopherCon 2017 -- an awesome experience.
I completely, 100% agree with what you just said. What I cannot grok is how the second sentence is compatible with the first and the abi-internal.md document. In particular,
Despite the lack of a clear definition of "allocated struct, array, or slice" in the language reference, I now better understand that means the storage of the variable exists on the heap and I can verify in I am so sorry to reopen this issue and extend the documentation, but I clearly don't understand something! Thank you for your time! |
@ianlancetaylor @bradfitz I now understand!! After digging through the commit log for the
Would you entertain a PR where that information is added to the "BUGS" section of the Will |
Change https://go.dev/cl/410102 mentions this issue: |
For #53223. Change-Id: I79e9b920488581a4d850e4051ee0dd600b5bbcb1 Reviewed-on: https://go-review.googlesource.com/c/go/+/410102 Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Austin Clements <[email protected]>
Hello everyone!
I hope that this is the right place to raise this issue:
I have read through the "Go internal ABI specification" (src/cmd/compile/internal-abi.md) and have studied the excellent, thorough discussion of the definition of the alignment of sequences (of which a
struct
is a special case) and the alignment of built-in types.I am curious, however, how that squares with the following statement
from https://pkg.go.dev/sync/atomic#pkg-note-BUG.
Nothing in the "Go internal ABI specification" seems to indicate that there is a special case for these architectures. I was just wondering if this is is because the representation made by https://pkg.go.dev/sync/atomic#pkg-note-BUG concerns the "public" ABI and would supersede the definitions/algorithms in the internal ABI in this case?
Or, is it simply something that is just out of date with a (admittedly internal) piece of documentation. If it is, I would be glad to submit a patch for the "Go internal ABI specification" document to bring it up to date.
That document is such a helpful, interesting read for so many reasons and one of the main reasons why I really enjoy working with this language!
Thanks for everything!
Will
cc @danscales
The text was updated successfully, but these errors were encountered: