-
-
Notifications
You must be signed in to change notification settings - Fork 669
Fix makeGray misuse in GC (#2178) #2285
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
Conversation
@dcodeIO bootstrap failed in CI but it works in my env. Do you have any idea?
|
It's something related to |
It seems to me that what |
The color for
In In the most of case, it is impossible that the child is white but parent is black, so the __link will do nothing in STATE_SWEEP. However template literals will use Static Array to join substring, and the static array isn't store in any reachable structure except shadow stack. It means after stack going back, the gcinfo stored in Static Array will not be updated. If white/black switch happened during the 2 times usage of same template string, unfortunately misuse of Updating GC algorithm to make it more robust is a solution. Another solution is change the |
Fixed by #2295 |
⯈Fixed Template literals cause GC crash #2178
⯈This bug is caused by the misuse of
makeGray
.makeGray
can only be used inSTATE_MARK
because it will add the object intotoSpace
, in the sweep state,toSpace
is used to store the object which need to free.⯈Add a
needScan
function to handle this situation, in the mark state it will callmakeGray
and in the other state will link the object intofromSpace
(just like __unpin did)