Problems with listappend
#27
Notifications
Total Time Spent: 2 hours
DiamondNether90
2 hours
No due date set.
Dependencies
No dependencies set.
Reference: ground/ground#27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Try running
tests/list.grnd, but replace the start withWhat I've found
appendToListis not the problem, as this program works fineWow this was a rabbit hole
I think I've found the cause though. When I run
printf("%i\n", in->args.args[1].type), it prints 0 (corresponding to int), rather than 2 (corresponding to string).I'm a bozo, disregard the previous post
Adding the following before the
break;incase LISTAPPEND:prints the proper list.My theory is that it is a problem with the closure implementation
Issue is a use-after-free (in copyGroundValue), not associated with the closure implementation. I've temporarily stopped freeGroundValue from freeing strings, and the issue seems to be fixed. It's a small leak for now. I'll investigate the issue further after exams
Reproducing the example does not invoke the closure system, I don't understand how it can be a closure error
Just a guess, I hadn't yet checked when the bug first appeared