Branch: Tag:

2014-06-16

2014-06-16 17:45:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Added PROGRAM_CLEAR_STORAGE.

Adds a flag indicating that the storage held by objects of the class
should be cleared prior to being freed. This is mainly to avoid having
secrets around longer than necessary.

FIXME: Consider adding a corresponding flag for objects to mark eg
some bignums for clearing.

4807:    return;    }    -  if (p->flags & PROGRAM_HAS_C_METHODS) { -  Pike_compiler->new_program->flags |= PROGRAM_HAS_C_METHODS; +  /* Propagate the HAS_C_METHODS and CLEAR_STORAGE flags. */ +  if (p->flags & (PROGRAM_HAS_C_METHODS|PROGRAM_CLEAR_STORAGE)) { +  Pike_compiler->new_program->flags |= +  (p->flags & (PROGRAM_HAS_C_METHODS|PROGRAM_CLEAR_STORAGE));    }       /* parent offset was increased by 42 for above test.. */