<div dir="ltr">Also now MCSerializationTest>>#testMczSerialization is succeeding for me, it was failing before
 (in JsSqueak)

</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 10, 2022 at 3:42 AM Fabio Niephaus <<a href="mailto:lists@fniephaus.com">lists@fniephaus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
Hi Florin,<br>
<br>
Happy new year and thanks for the bug report! PNGReadWriterTest seems<br>
to pass on TruffleSqueak (although I remember some bug fixing a while<br>
ago). Anyway, I looked into #primitiveZipSendBlock which seems to be<br>
the only sender of #loadZipEncoderFrom:.<br>
<br>
While #loadZipEncoderFrom: reads from writeStreamInstSize + 1 and + 2,<br>
which is off by one as you mentioned, #primitiveZipSendBlock stores at<br>
readStreamInstSize + 1 and + 2. And as it happens, readStreamInstSize<br>
seems to be 4 while writeStreamInstSize is 5, which compensates for<br>
the off-by-one error. However, I don't understand why reading from the<br>
wrong positions does not cause the tests to fail. Anyway, I cleaned<br>
this up in TruffleSqueak (see [1]).<br>
<br>
Fabio<br>
<br>
[1] <a href="https://github.com/hpi-swa/trufflesqueak/commit/5b6066b54e03e19ec4c4d2b22550ff081e46f6e6" rel="noreferrer" target="_blank">https://github.com/hpi-swa/trufflesqueak/commit/5b6066b54e03e19ec4c4d2b22550ff081e46f6e6</a><br>
<br>
On Mon, Jan 10, 2022 at 4:33 AM Florin Mateoc <<a href="mailto:florin.mateoc@gmail.com" target="_blank">florin.mateoc@gmail.com</a>> wrote:<br>
><br>
><br>
> I should have also mentioned that PNGReadWriterTest also has 18 failures for SqueakJS, and I think I remember them failing in TruffleSqueak as well<br>
><br>
> On Sun, Jan 9, 2022 at 10:18 PM Florin Mateoc <<a href="mailto:florin.mateoc@gmail.com" target="_blank">florin.mateoc@gmail.com</a>> wrote:<br>
>><br>
>> Hi all, and Happy New Year!<br>
>><br>
>> I think I just found a couple of bugs in the DeflatePlugin. They were causing errors in my JsSqueak, I don't fully understand why they don't seem to cause problems in Squeak. Anyway, after I fixed them, the primitives work and the PNGReadWriterTest tests are all succeeding for me.<br>
>><br>
>> One is in #loadZipEncoderFrom:<br>
>> The method checks and then determines the writeStreamInstSize and then fetches the bitBuffer and bitPosition (the first two instvars of ZipEncoder, a direct subclass of WriteStream) from offsets writeStreamInstSize + 1 and writeStreamInstSize + 2, although the fetches are 0-based<br>
>><br>
>> The other is in #primitiveZipSendBlock<br>
>> The method, still working on a ZipEncoder, at the end stores the modified values for bitBuffer and bitPosition at offset readStreamInstSize + 1 and readStreamInstSize + 2, which is just wrong.<br>
>><br>
>> As I said, I don't quite get why this does not cause at least image-side errors if not VM crashes in Squeak, but they should probably be fixed anyway :)<br>
>><br>
>> All the best,<br>
>> Florin<br>
</blockquote></div>