MPS issue job003865

TitleUnfinalizable objects can be registered for finalization
Statusclosed
Prioritynice
Assigned userGareth Rees
OrganizationRavenbrook
Descriptionmps_finalize does not check that the reference is finalizable. (Originally reported by GRM [1].)
AnalysisArenaFinalize checks ArenaHasAddr(arena, ref) which discovers whether the reference belongs to some pool, but not whether the pool supports finalization. Need to call PoolOfAddr and check that PoolHasAttr(pool, AttrGC).

It would be nice to have some test cases too.
How foundinspection
Evidence[1] <https://info.ravenbrook.com/project/mp...01-11-05/mmprevol/request/dylan/180020/>
Test procedurefunction/228.c
Created byGareth Rees
Created on2014-09-30 22:21:22
Last modified byGareth Rees
Last modified on2014-10-20 17:27:26
History2014-09-30 GDR Created.

Fixes

Change Effect Date User Description
187109 closed 2014-10-02 10:27:57 Gareth Rees ArenaFinalize now asserts that the object belongs to a finalizable (AttrGC) pool. (It's a programming error to try to register a non-finalizable object for finalization.)
Can't test this behaviour via the smoke tests, unfortunately.
Document the performance problem with mps_definalize, so that users aren't tempted into using it inappropriately.