-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Array size self mutation or string concatenation issue #2308
Comments
I ran more tests on it on found that the bug is only triggered because using a |
@Praetonus - if you're not actively working on this, can you dump what you learned in your investigation so far, and then unassign yourself here, so that someone else might be able to pick it up? |
This is a GC issue with structs where trace functions aren't getting generated, which in this case causes a premature collection of the inner array. This should be an easy fix. |
Previously, tracing functions weren't being generated for structs, which caused their fields to never be traced, resulting in various bugs including premature GC collection. Closes ponylang#2308.
Previously, tracing functions weren't being generated for structs, which caused their fields to never be traced, resulting in various bugs including premature GC collection. Closes #2308.
In the following code we create an array of 56 bytes and never add or delete element. Then, we call a behavior that will print the array size and call itself again. The first calls print the correct size (56) but at some point in time, it starts to print other (wrong) values. After a few iterations I got the following output:
I tested it on Windows with the version 0.19.3-6a0dd3a [release] and compiled it with
ponyc -d
Since I reported it on the IRC channel first, @Praetonus has managed to reproduce it and started to investigate it and thinks it is a bug in the string concatenation.
The text was updated successfully, but these errors were encountered: