<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Nicolas,</div><div><br>On Sep 29, 2014, at 11:15 PM, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">So generally, all tempAt: accesses should be protected?<br></div></div></blockquote><div><br></div>No. &nbsp;Accesses to arguments will always be ok, hence no guard in tempAt: 1 below (the Exception argument). &nbsp;Further, if the context has not been returned from then all its temps will be accessible. &nbsp;These guards should be few and far between.<br style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><br style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">Eliot (phone)</span><div><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span><blockquote type="cite"><div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-29 23:22 GMT+02:00  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Eliot Miranda uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-eem.876.mcz" target="_blank">http://source.squeak.org/trunk/Kernel-eem.876.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-eem.876<br>
Author: eem<br>
Time: 29 September 2014, 2:21:45.514 pm<br>
UUID: 9ea5bea7-14c9-48c9-9d49-ca311d68d49a<br>
Ancestors: Kernel-ul.875<br>
<br>
Fix handleSignal: for a rare edge case that can<br>
occur on Stack &amp; Cog VMs.<br>
<br>
=============== Diff against Kernel-ul.875 ===============<br>
<br>
Item was changed:<br>
&nbsp; ----- Method: ContextPart&gt;&gt;handleSignal: (in category 'private-exceptions') -----<br>
&nbsp; handleSignal: exception<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"Sent to handler (on:do:) contexts only.&nbsp; If my exception class (first arg) handles exception<br>
+&nbsp; &nbsp; &nbsp; &nbsp; and the handler is active then execute my handle block (second arg), otherwise forward<br>
+&nbsp; &nbsp; &nbsp; &nbsp; this message to the next handler context.&nbsp; If none left, execute exception's defaultAction<br>
+&nbsp; &nbsp; &nbsp; &nbsp; (see nil&gt;&gt;handleSignal:)."<br>
-&nbsp; &nbsp; &nbsp; &nbsp;"Sent to handler (on:do:) contexts only.&nbsp; If my exception class (first arg) handles exception then execute my handle block (second arg), otherwise forward this message to the next handler context.&nbsp; If none left, execute exception's defaultAction (see nil&gt;&gt;handleSignal:)."<br>
<br>
+&nbsp; &nbsp; &nbsp; &nbsp;| handlerActive val |<br>
+&nbsp; &nbsp; &nbsp; &nbsp;"If the context has been returned from the handlerActive temp var may not be accessible."<br>
+&nbsp; &nbsp; &nbsp; &nbsp;handlerActive := stackp &gt;= 3 and: [(self tempAt: 3) == true].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;(((self tempAt: 1) handles: exception) and: [handlerActive]) ifFalse:<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[^self nextHandlerContext handleSignal: exception].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;| val |<br>
-&nbsp; &nbsp; &nbsp; &nbsp;(((self tempAt: 1) handles: exception) and: [self tempAt: 3]) ifFalse: [<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^ self nextHandlerContext handleSignal: exception].<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; exception privHandlerContext: self contextTag.<br>
&nbsp; &nbsp; &nbsp; &nbsp; self tempAt: 3 put: false.&nbsp; "disable self while executing handle block"<br>
+&nbsp; &nbsp; &nbsp; &nbsp;val := [(self tempAt: 2) cull: exception]<br>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ensure: [self tempAt: 3 put: true].<br>
+&nbsp; &nbsp; &nbsp; &nbsp;self return: val&nbsp; "return from self if not otherwise directed in handle block"<br>
-&nbsp; &nbsp; &nbsp; &nbsp;val := [(self tempAt: 2) cull: exception ]<br>
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ensure: [self tempAt: 3 put: true].<br>
-&nbsp; &nbsp; &nbsp; &nbsp;self return: val.&nbsp; "return from self if not otherwise directed in handle block"<br>
&nbsp; !<br>
<br>
<br>
</blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span></span><br></div></blockquote></div></body></html>