Menu

#4 Relinking a class may corrupt instance vars

open-accepted
None
5
2008-11-16
2008-11-16
No

Instance variable order might change if a class is relinked to a new superclass which has different instance variables.

Check this, write tests.

Discussion

  • Michael van der Gulik

    • assigned_to: nobody --> gulik
    • status: open --> open-accepted
     
  • Michael van der Gulik

    This is because the instSize of the class (recorded in the class format header) remains unchanged and inst var accesses are recorded by offset (including subclass instvars).

    Classes need recompiling if the superclass changes.

     

Log in to post a comment.

MongoDB Logo MongoDB