Today I found a curious bug in the VMprPointerReplaceFromToWithObject primitive: In EsWeakArray, it only fills the slots up to the next-to-last one. (EsWeakArray new: 5) replaceFrom: 1 to: 5 withObject: 1 results in (1 1 1 1 nil) Apparently, in computing the limit it does not skip the named instance variable. I could verify this assumption by defining a subclass of Array with two named instance variables, and for this subclass, the last two slots will be left nil. I see this behavior in Windows and Linux 64 bit 9.1 VMs with fixpack 9.1.1. Is this a known bug, and will it been fixed in 9.2? Cheers, Hans-Martin You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/b6c5d1c7-bebb-49a8-9a11-ca3458c80291%40googlegroups.com. |
Hi Hans-Martin, Great catch. I can reproduce it very easily as you pointed out: Array variableSubclass: #MyArray classInstanceVariableNames: '' instanceVariableNames: 'instVar1 instVar2 ' classVariableNames: '' poolDictionaries: '' (MyArray new: 5) replaceFrom: 1 to: 5 withObject: 1 -----> (1 1 1 nil nil) I am already writing a unit test for this and I have forwarded this issue to our VM team. I will keep you posted. On Wed, Oct 23, 2019 at 11:13 AM 'Hans-Martin Mosner' via VA Smalltalk <[hidden email]> wrote:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibEH6ENwefhLa%2Buvo15rPjgqYThSsU54YgpvD6ioD8b5HQ%40mail.gmail.com. |
Thanks for reporting Hans-Martin,
-- We have made the appropriate fix to the 'end' counter of the for loop which was not adjusted for namedInstVarSize. It has been committed and will be in 9.2 - Seth On Wednesday, October 23, 2019 at 10:24:38 AM UTC-4, Mariano Martinez Peck wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/70657c09-7923-424d-8b4a-1f6fa95b7faa%40googlegroups.com. |
Free forum by Nabble | Edit this page |