You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I managed to shoot myself in the foot by reading back an array that was set via setListCountAndRef by extracting the Ptr near the end of the lifetime of a struct, followed by reading the array with peekArray. Because the array lifetime is coupled to the struct lifetime, this caused the array to be overwritten sometimes before peekArray was finished.
While that's entirely my fault, it would be nice to have more field accessor functions. I already have some in Program.Foreign: withUnsafeField, getListCountAndRef. (Besides, the function withArrayLen from this module should probably be in Graphics.Vulkan.Marshal). Not making a pull request because I don't know where to put them, and I guess they can be done without IO somehow.
The text was updated successfully, but these errors were encountered:
Sorry, I did not have time to work this project lately. The suggestion seems very reasonable to me. If you like and have some time, please make a PR and I'd be happy to merge it.
I managed to shoot myself in the foot by reading back an array that was set via
setListCountAndRef
by extracting thePtr
near the end of the lifetime of a struct, followed by reading the array withpeekArray
. Because the array lifetime is coupled to the struct lifetime, this caused the array to be overwritten sometimes beforepeekArray
was finished.While that's entirely my fault, it would be nice to have more field accessor functions. I already have some in Program.Foreign:
withUnsafeField
,getListCountAndRef
. (Besides, the functionwithArrayLen
from this module should probably be inGraphics.Vulkan.Marshal
). Not making a pull request because I don't know where to put them, and I guess they can be done withoutIO
somehow.The text was updated successfully, but these errors were encountered: