Title | Unfinalizable objects can be registered for finalization |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | mps_finalize does not check that the reference is finalizable. (Originally reported by GRM [1].) |
Analysis | ArenaFinalize 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 found | inspection |
Evidence | [1] <https://info.ravenbrook.com/project/mp...01-11-05/mmprevol/request/dylan/180020/ > |
Test procedure | function/228.c |
Created by | Gareth Rees |
Created on | 2014-09-30 22:21:22 |
Last modified by | Gareth Rees |
Last modified on | 2014-10-20 17:27:26 |
History | 2014-09-30 GDR Created. |
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. |