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

Marcel Taeumel marcel.taeumel at hpi.de
Tue Mar 24 10:43:30 UTC 2020


Hi Torge.

Thanks. I know how to workaround that debugger in my image. I was asking for a general fix for Trunk.

Best,
Marcel
Am 24.03.2020 11:04:48 schrieb Torge Husfeldt <torge.husfeldt at gmx.de>:
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/9b48b228/attachment.html>


More information about the Squeak-dev mailing list