fix: correct gcmask value in documentation#69
Open
saschabuehrle wants to merge 1 commit intocloudwego:mainfrom
Open
fix: correct gcmask value in documentation#69saschabuehrle wants to merge 1 commit intocloudwego:mainfrom
saschabuehrle wants to merge 1 commit intocloudwego:mainfrom
Conversation
The gcmask for the Object struct should be 1001, not 1010. Given the Object structure: - A string (base+0): pointer to string data - bit 1 - A string length (base+8): not a pointer - bit 0 - B int64 (base+16): not a pointer - bit 0 - C *[]byte (base+24): pointer - bit 1 The correct gcmask is 1001 (bits for base+0, base+8, base+16, base+24).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #69 +/- ##
==========================================
+ Coverage 2.70% 60.84% +58.14%
==========================================
Files 15 16 +1
Lines 2221 2222 +1
==========================================
+ Hits 60 1352 +1292
+ Misses 2155 716 -1439
- Partials 6 154 +148
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Sorry to interrupt, I wanted to let you know that this PR is most probably entirely AI-generated, including replies to your comments. Just see the batch of PRs they opened recently to form your own opinion. I doubt they'll sign the CLA. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes #66 — The gcmask value in the documentation example was incorrect.
Fix
Changed to for the Object struct's gcmask.
Analysis
Given the Object structure:
The gcmask indicates which 8-byte aligned addresses contain pointers:
base+0: A string (contains pointer to string data) - bit 1base+8: A string length (not a pointer) - bit 0base+16: B int64 (not a pointer) - bit 0base+24: C *[]byte (pointer) - bit 1Therefore, the correct gcmask is 1001 (reading bits from left to right for base+0, base+8, base+16, base+24).
Testing
Verified by analyzing the memory layout and pointer positions in the Object struct.
Greetings, saschabuehrle