memory safety and weak references

Oliver Hunt oliver at apple.com
Thu Mar 28 19:47:23 PDT 2013


On Mar 29, 2013, at 7:36 AM, David Herman <dherman at mozilla.com> wrote:

> On Mar 27, 2013, at 4:52 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> 
>> On Tue, Mar 26, 2013 at 11:44 PM, Oliver Hunt <oliver at apple.com> wrote:
>>> That said I believe that this does kill any dreams i may have had w.r.t primitive-keyed WeakMaps, kudos to MarkM.
>> 
>> Wouldn't a primitive-keyed WeakMap just be a strong Map for those
>> keys?  And therefore immune to any GC attacks?
> 
> Indeed, and also deeply misleading (a weak map with strongly held entries?), which is why I argued that WeakMap should disallow primitive keys.
> 
> Oliver-- can you clarify what you were hoping for?

I was dreaming of primitive keys, i was convinced in an earlier meeting of the problems that they would cause, but this security problem is a nail in the coffin :-/

> 
> Dave
> 



More information about the es-discuss mailing list