summaryrefslogtreecommitdiff
path: root/PLATFORMS.md
diff options
context:
space:
mode:
authorJonathan Schleifer <js@nil.im>2020-01-24 04:03:32 +0100
committerJonathan Schleifer <js@nil.im>2020-01-24 04:03:32 +0100
commitcd3fd0a7aa041c635a3e237f2c87bb7f6955524a (patch)
tree8af728e7a0157665ee5fdd56df0d43f1001011ca /PLATFORMS.md
parentd7f825d4d5d2997d97f90f926adbcffd325fdc0b (diff)
runtime: Correctly handle AR pool push during popHEADmaster
Getting a pointer and increasing it until we reach the top pointer does not work: Releasing an object can temporarily create new autorelease pools, which can trigger resizing of "objects" using realloc, which can move it to a different address, which will then lead to continuing to iterate on a now invalid pointer. This is now solved by using an index into "objects" instead. Since we're now indexing for the pop, let's use indexes everywhere, as they're more readable anyway. While debugging this, I noticed that the last pool is popped quite frequently, only for a new pool to be pushed immediately again. This resulted in a free followed by a malloc every time. Instead, keep the pool, but let OFThread explicitly say when to free everything.
Diffstat (limited to 'PLATFORMS.md')
0 files changed, 0 insertions, 0 deletions