-
Notifications
You must be signed in to change notification settings - Fork 375
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
fix: []byte("xxx") should not be treated as const #1597
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1597 +/- ##
==========================================
+ Coverage 55.80% 56.17% +0.37%
==========================================
Files 436 436
Lines 66168 66549 +381
==========================================
+ Hits 36922 37382 +460
+ Misses 26356 26247 -109
- Partials 2890 2920 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Looks good to me
…lang#1597) this is a fix to gnolang#1570 . The underlying issue in gnolang#1570 stems from how []byte("xxx") is handled: it's treated as a constant, yet its value can still be altered. This mutability leads to unintended persistence of its state across loop iterations. The proposed resolution involves modifying the preprocessing stage to avoid converting an untyped string directly into a []byte type.
this is a fix to #1570 .
The underlying issue in #1570 stems from how []byte("xxx") is handled: it's treated as a constant, yet its value can still be altered. This mutability leads to unintended persistence of its state across loop iterations.
The proposed resolution involves modifying the preprocessing stage to avoid converting an untyped string directly into a []byte type.