<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Levente, hi Christoph.<div><br></div><div>> <span style="font-family: Calibri, Helvetica, sans-serif;font-size: 16px">I cannot reproduce this using a fresh Trunk image</span></div><div><span style="font-family: Calibri, Helvetica, sans-serif;font-size: 16px"><br></span></div><div><span style="font-family: Calibri, Helvetica, sans-serif;font-size: 16px">I am not exactly sure why my Trunk image keeps generating those private keys. But I am happy that the bug surfaced. Now we need to address it. :-)</span></div><div><span style="font-family: Calibri, Helvetica, sans-serif;font-size: 16px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> The main issue is that literal objects created by Compiler >> #evaluate:*  </span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">are now immutable but I think they shouldn't be. What do you think?</span><span style="font-family: Calibri, Helvetica, sans-serif;font-size: 16px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Well, I think that literals producing numbers, strings, or symbols should be protected in this way. For literal arrays, I am not so sure.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">For starters, the #printString of modifiable arrays is wrong if literal arrays should be immutable:</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">x := {1. 2. 3}.</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">x at: 1 put: #foo.</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">x "#(#foo 2 3) --- wrong print string!"</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">y := #(1 2 3).</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">y at: 1 put: #foo. "ModificationForbidden"</span></span></div></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Then, in the past, I have been complaining about the array cache in compiled methods:</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">someDefault</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">   ^ #(1 2 3)</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">In this case, I expected the method to always return a new array. Now, it is immutable, but that is not as expected. I think. Is it still cached?</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">***</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">In my case here, the code tries to change a LargePositiveInteger, not an array, which has always been wrong. :-) Is there a way to safely discard a LargePositiveInteger from memory?</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">> </span></span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">System-ul.1148 should work the issue around. Please let me know if it</span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> </span></div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">helped.</span><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Not quite. I think have to manually clear the current keys in the SecurityManager first.</span></span></div><div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px"><br></span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Best,</span></span></div><div style=""><span style="font-family: Arial, Helvetica, sans-serif"><span style="font-size: 13px">Marcel</span></span></div><div class="mb_sig"></div>
                                        
                                        </div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 24.03.2020 21:18:51 schrieb Levente Uzonyi <leves@caesar.elte.hu>:</p><div style="font-family:Arial,Helvetica,sans-serif">Hi Marcel,<br><br>System-ul.1148 should work the issue around. Please let me know if it <br>helped.<br>The main issue is that literal objects created by Compiler >> #evaluate:* <br>are now immutable but I think they shouldn't be. What do you think?<br><br><br>Levente<br><br>On Tue, 24 Mar 2020, Marcel Taeumel wrote:<br><br>> Hi, there.<br>> <br>> I just wanted to save a 32-bit image (Update 19541, VM 202003021730, Windows 10) under a new filename.<br>> <br>> Boom! ModificationForbidden!<br>> <br>> Here is the interesting stack:<br>> <br>> Context>>modificationForbiddenFor:at:put:<br>> LargePositiveInteger(Object)>>basicAt:put:<br>> SecurityManager>>flushSecurityKey:<br>> SecurityManager>>flushSecurityKeys<br>> SecurityManager>>shutDown<br>> SecurityManager class>>shutDown<br>> SecurityManager class(Behavior)>>shutDown:<br>> [] in SmalltalkImage>>send:toClassesNamedIn:with:<br>> OrderedCollection>>do:<br>> SmalltalkImage>>send:toClassesNamedIn:with:<br>> SmalltalkImage>>processShutDownList:<br>> <br>> Well, that code tries to change a LargePositiveInteger:<br>> <br>> SecurityManager >> flushSecurityKey: aKey<br>> "Flush a security key"<br>> | n |<br>> n := aKey first.<br>> 1 to: n basicSize do:[:i| n basicAt: i put: 0].<br>> n := aKey second.<br>> 1 to: n basicSize do:[:i| n basicAt: i put: 0].<br>> <br>> How to fix that without breaking security measures or the underlying concept?<br>> <br>> Best,<br>> Marcel<br>> <br>><br><br></div></blockquote></div>