<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi Nicolas, hi Eliot, hi all,</p>
<p><br>
</p>
<p>this appears to be a merge coordination error again.</p>
<p><br>
</p>
<p>Originally, in <span><b>KernelTests-ct.382,</b> I included a call to the primitive without arguments which makes the VM crash, see <a href="http://forum.world.st/The-Inbox-KernelTests-ct-382-mcz-tp5125776p5125777.html" class="x_OWAAutoLink" id="LPlnk899260">http://forum.world.st/The-Inbox-KernelTests-ct-382-mcz-tp5125776p5125777.html</a> (the
 relevant line is </span><span style="font-size:12pt">+ {}. "missing selector"). Others pointed out correctly that this was a nonsense test, so I uploaded <span><b>KernelTests-ct.383</b> as a replacement which removed the relevant lines. But take attention
 to the diff in the mail on squeak-dev which appears to be erroneous. However, somehow the changes from KernelTests-ct.382 but not <span>KernelTests-ct.383</span> have made their way into <span><b>KernelTests-eem.396.</b> Eliot, was this an incident or by attempt?
 :-)</span></span></span></p>
<p><span style="font-size:12pt"><span><span><br>
</span></span></span></p>
<p><span style="font-size:12pt"><span><span>Long story short: By merging <span>KernelTests-ct.383 into the trunk, too, the CI should pass again. But please double-check the diff in Monticello before approving it. :-)</span></span></span></span></p>
<p><span style="font-size:12pt"><span><span><span><br>
</span></span></span></span></p>
<p><span style="font-size:12pt"><span><span><span>Best,</span></span></span></span></p>
<p><span style="font-size:12pt"><span><span><span>Christoph</span></span></span></span></p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com><br>
<b>Gesendet:</b> Mittwoch, 14. April 2021 17:21:42<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: Kernel-ct.1383.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi all,<br>
it seems that it solves the failing tests for primitive 84 and 100.<br>
But I still get a problem with testPrimitive83.<br>
The test fails, and if I click on it in the TestRunner, the image<br>
crash (SEGV) - at least on windows.<br>
There is a SqueakDebug.log though, and it seems that we try to send<br>
the message 83...<br>
I don't know if you can reproduce or not, but help would be highly appreciated.<br>
Christoph, do you have a clue?<br>
<br>
Le mer. 14 avr. 2021 à 14:53, <commits@source.squeak.org> a écrit :<br>
><br>
> Nicolas Cellier uploaded a new version of Kernel to project The Trunk:<br>
> <a href="http://source.squeak.org/trunk/Kernel-ct.1383.mcz">http://source.squeak.org/trunk/Kernel-ct.1383.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Kernel-ct.1383<br>
> Author: ct<br>
> Time: 20 March 2021, 7:21:02.280742 pm<br>
> UUID: b1953f95-408a-aa4a-9108-cc1dc355e9d1<br>
> Ancestors: Kernel-mt.1381<br>
><br>
> Fixes simulation of the #perform:... primitives 83, 84, and 100 for all edge cases. If the primitive is called with the wrong arguments, the primitive must fail but not the simulator.<br>
><br>
> For further reference, see also the implementation of primitive 188 (primitiveExecuteMethodArgsArray) just a few lines below. :-)<br>
><br>
> Tests have been provided in KernelTests-ct.395. Reuploaded to fix mirror variant of primitive 100. Now it's finally possible to debug MirrorPrimitiveTests>>#testMirrorPerform. Replaces Kernel-ct.1367, which can be moved into the treated inbox.<br>
><br>
> =============== Diff against Kernel-mt.1381 ===============<br>
><br>
> Item was changed:<br>
>   ----- Method: Context>>doPrimitive:method:receiver:args: (in category 'private') -----<br>
>   doPrimitive: primitiveIndex method: meth receiver: receiver args: arguments<br>
>         "Simulate a primitive method whose index is primitiveIndex.  The simulated receiver and<br>
>          arguments are given as arguments to this message. If successful, push result and return<br>
>          resuming context, else ^ {errCode, PrimitiveFailToken}. Any primitive which provokes<br>
>          execution needs to be intercepted and simulated to avoid execution running away."<br>
><br>
>         | value |<br>
>         "Judicious use of primitive 19 (a null primitive that doesn't do anything) prevents<br>
>          the debugger from entering various run-away activities such as spawning a new<br>
>          process, etc.  Injudicious use results in the debugger not being able to debug<br>
>          interesting code, such as the debugger itself.  Hence use primitive 19 with care :-)"<br>
>         "SystemNavigation new browseAllSelect: [:m| m primitive = 19]"<br>
>         primitiveIndex = 19 ifTrue: [<br>
>                 [self notify: ('The code being simulated is trying to control a process ({1}). Process controlling cannot be simulated. If you proceed, things may happen outside the observable area of the simulator.' translated format: {meth reference})]<br>
>                         ifCurtailed: [self push: nil "Cheap fix of the context's internal state"]].<br>
><br>
>         ((primitiveIndex between: 201 and: 222)<br>
>          and: [(self objectClass: receiver) includesBehavior: BlockClosure]) ifTrue:<br>
>                 [(primitiveIndex = 206<br>
>                   or: [primitiveIndex = 208]) ifTrue:                                           "[Full]BlockClosure>>valueWithArguments:"<br>
>                         [^receiver simulateValueWithArguments: arguments first caller: self].<br>
>                  ((primitiveIndex between: 201 and: 209)                         "[Full]BlockClosure>>value[:value:...]"<br>
>                   or: [primitiveIndex between: 221 and: 222]) ifTrue: "[Full]BlockClosure>>valueNoContextSwitch[:]"<br>
>                         [^receiver simulateValueWithArguments: arguments caller: self]].<br>
><br>
>         primitiveIndex = 83 ifTrue: "afr 9/11/1998 19:50" "Object>>perform:[with:...]"<br>
> +               [| selector |<br>
> +               selector := arguments at: 1 ifAbsent:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad argument'].<br>
> +               arguments size - 1 = selector numArgs ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad number of arguments'].<br>
> +               ^self send: selector to: receiver with: arguments allButFirst].<br>
> -               [^self send: arguments first to: receiver with: arguments allButFirst].<br>
>         primitiveIndex = 84 ifTrue: "afr 9/11/1998 19:50 & eem 8/18/2009 17:04" "Object>>perform:withArguments:"<br>
> +               [| selector args |<br>
> +               arguments size = 2 ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad argument'].<br>
> +               selector := arguments first.<br>
> +               args := arguments second.<br>
> +               args isArray ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad argument'].<br>
> +               args size = selector numArgs ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad number of arguments'].<br>
> +               ^self send: selector to: receiver with: args].<br>
> -               [^self send: arguments first to: receiver with: (arguments at: 2) lookupIn: (self objectClass: receiver)].<br>
>         primitiveIndex = 100 ifTrue: "eem 8/18/2009 16:57" "Object>>perform:withArguments:inSuperclass:"<br>
> +               [| rcvr selector args superclass |<br>
> +               arguments size<br>
> +                       caseOf: {<br>
> +                               [3] -> [<br>
> +                                       rcvr := receiver.<br>
> +                                       selector := arguments first.<br>
> +                                       args := arguments second.<br>
> +                                       superclass := arguments third].<br>
> +                               [4] -> ["mirror primitive"<br>
> +                                       rcvr := arguments first.<br>
> +                                       selector := arguments second.<br>
> +                                       args := arguments third.<br>
> +                                       superclass := arguments fourth] }<br>
> +                       otherwise: [^ self class primitiveFailTokenFor: #'bad argument'].<br>
> +               args isArray ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad argument'].<br>
> +               args size = selector numArgs ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad number of arguments'].<br>
> +               ((self objectClass: rcvr) includesBehavior: superclass) ifFalse:<br>
> +                       [^ self class primitiveFailTokenFor: #'bad argument'].<br>
> +               ^self send: selector to: rcvr with: args lookupIn: superclass].<br>
> -               [^self send: arguments first to: receiver with: (arguments at: 2) lookupIn: (arguments at: 3)].<br>
><br>
>         "Mutex>>primitiveEnterCriticalSection<br>
>          Mutex>>primitiveTestAndSetOwnershipOfCriticalSection"<br>
>         (primitiveIndex = 186 or: [primitiveIndex = 187]) ifTrue:<br>
>                 [| effective |<br>
>                  effective := Processor activeProcess effectiveProcess.<br>
>                  "active == effective"<br>
>                  value := primitiveIndex = 186<br>
>                                         ifTrue: [receiver primitiveEnterCriticalSectionOnBehalfOf: effective]<br>
>                                         ifFalse: [receiver primitiveTestAndSetOwnershipOfCriticalSectionOnBehalfOf: effective].<br>
>                  ^(self isPrimFailToken: value)<br>
>                         ifTrue: [value]<br>
>                         ifFalse: [self push: value]].<br>
><br>
>         primitiveIndex = 188 ifTrue:    "Object>>withArgs:executeMethod:<br>
>                                                                         CompiledMethod class>>receiver:withArguments:executeMethod:<br>
>                                                                         VMMirror>>ifFail:object:with:executeMethod: et al"<br>
>                 [| n args methodArg thisReceiver |<br>
>                  ((n := arguments size) between: 2 and: 4) ifFalse:<br>
>                         [^self class primitiveFailTokenFor: #'unsupported operation'].<br>
>                  ((self objectClass: (args := arguments at: n - 1)) == Array<br>
>                   and: [(self objectClass: (methodArg := arguments at: n)) includesBehavior: CompiledMethod]) ifFalse:<br>
>                         [^self class primitiveFailTokenFor: #'bad argument'].<br>
>                  methodArg numArgs = args size ifFalse:<br>
>                         [^self class primitiveFailTokenFor: #'bad number of arguments'].<br>
>                  thisReceiver := arguments at: n - 2 ifAbsent: [receiver].<br>
>                  methodArg primitive > 0 ifTrue:<br>
>                         [methodArg isQuick ifTrue:<br>
>                                 [^self push: (methodArg valueWithReceiver: thisReceiver arguments: args)].<br>
>                          ^self doPrimitive: methodArg primitive method: meth receiver: thisReceiver args: args].<br>
>                  ^Context<br>
>                         sender: self<br>
>                         receiver: thisReceiver<br>
>                         method: methodArg<br>
>                         arguments: args].<br>
><br>
>         primitiveIndex = 118 ifTrue: "[receiver:]tryPrimitive:withArgs:; avoid recursing in the VM"<br>
>                 [(arguments size = 3<br>
>                   and: [(self objectClass: arguments second) == SmallInteger<br>
>                   and: [(self objectClass: arguments last) == Array]]) ifTrue:<br>
>                         [^self doPrimitive: arguments second method: meth receiver: arguments first args: arguments last].<br>
>                  (arguments size = 2<br>
>                  and: [(self objectClass: arguments first) == SmallInteger<br>
>                  and: [(self objectClass: arguments last) == Array]]) ifFalse:<br>
>                         [^self class primitiveFailTokenFor: nil].<br>
>                  ^self doPrimitive: arguments first method: meth receiver: receiver args: arguments last].<br>
><br>
>         value := primitiveIndex = 120 "FFI method"<br>
>                                 ifTrue: [(meth literalAt: 1) tryInvokeWithArguments: arguments]<br>
>                                 ifFalse:<br>
>                                         [primitiveIndex = 117 "named primitives"<br>
>                                                 ifTrue: [self tryNamedPrimitiveIn: meth for: receiver withArgs: arguments]<br>
>                                                 ifFalse: "should use self receiver: receiver tryPrimitive: primitiveIndex withArgs: arguments but this is only in later VMs (and appears to be broken)"<br>
>                                                         [receiver tryPrimitive: primitiveIndex withArgs: arguments]].<br>
><br>
>         ^(self isPrimFailToken: value)<br>
>                 ifTrue: [value]<br>
>                 ifFalse: [self push: value]!<br>
><br>
><br>
<br>
</div>
</span></font>
</body>
</html>