[squeak-dev] Save as new image -> ModificationForbidden!

Torge Husfeldt torge.husfeldt at gmx.de
Tue Mar 24 10:04:35 UTC 2020


Simple: 
• create a weak reference to said bigInt
• remove last hard reference
• call gc
• verify that weak reference points to reclaimed object 
;)
You will have to do that one step down the stack, though 

Von meinem iPhone gesendet

> Am 24.03.2020 um 09:39 schrieb Marcel Taeumel <marcel.taeumel at hpi.de>:
> 
> 
> Hi, there.
> 
> I just wanted to save a 32-bit image (Update 19541, VM 202003021730, Windows 10) under a new filename.
> 
> Boom! ModificationForbidden!
> 
> Here is the interesting stack:
> 
> Context>>modificationForbiddenFor:at:put:
> LargePositiveInteger(Object)>>basicAt:put:
> SecurityManager>>flushSecurityKey:
> SecurityManager>>flushSecurityKeys
> SecurityManager>>shutDown
> SecurityManager class>>shutDown
> SecurityManager class(Behavior)>>shutDown:
> [] in SmalltalkImage>>send:toClassesNamedIn:with:
> OrderedCollection>>do:
> SmalltalkImage>>send:toClassesNamedIn:with:
> SmalltalkImage>>processShutDownList:
> 
> Well, that code tries to change a LargePositiveInteger:
> 
> SecurityManager >> flushSecurityKey: aKey
> 	"Flush a security key"
> 	| n |
> 	n := aKey first.
> 	1 to: n basicSize do:[:i| n basicAt: i put: 0].
> 	n := aKey second.
> 	1 to: n basicSize do:[:i| n basicAt: i put: 0].
> 
> How to fix that without breaking security measures or the underlying concept?
> 
> Best,
> Marcel
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200324/0797115a/attachment.html>


More information about the Squeak-dev mailing list