Fix #9267, 47a99bb: [Squirrel] Heap use after free
Due topull/259/head47a99bb
the order of elements in the garbage collection chain has changed causing the class to be finalised before the instances of that class. Since the instance's array of member values depends on the size of the values in the class, the class finalisation resetting that size to 0 causes not all finalisations to run, which subsequently causes a heap use after free. So, just set the SQObjectPtrs to 'null' during the finalisation of the SQClass so the SQInstance can release all instance variables during its finalisation. (cherry picked from commit5c01f9ea52
) See: #256
parent
8eb34b2f10
commit
7274432987
Loading…
Reference in New Issue