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

Eliot Miranda eliot.miranda at gmail.com
Wed Mar 25 08:36:21 UTC 2020


Hi Levente,


> On Mar 24, 2020, at 1:18 PM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> 
> Hi Marcel,
> 
> System-ul.1148 should work the issue around. Please let me know if it helped.
> The main issue is that literal objects created by Compiler >> #evaluate:* are now immutable but I think they shouldn't be. What do you think?

That’s a good question.  I think they have to be, to be consistent.  It’s not hard to write eg 
     a := ‘foo’ copy
or
     a := #((1 2 3) (4 5 6)) deepCopy


We might add a query to Object which is something like isReferencedLiteral so one can check if a read-only object is referenced as a literal in code before one sends it beWritableObject when one wants to patch things up in the inspector or debugger.

> 
> 
> Levente
> 
>> On Tue, 24 Mar 2020, Marcel Taeumel wrote:
>> 
>> 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
>> 
> 


More information about the Squeak-dev mailing list