[Vm-dev] something fishy with genPrimitiveStringReplace

Clément Bera bera.clement at gmail.com
Sun Nov 26 21:58:24 UTC 2017


I think those lines are the problem:

        "0 >= start, fail"
cogit CmpCq: (objectMemory integerObjectOf: 0) R: startReg.
jumpOutOfBounds1 := cogit JumpLess: 0.
"0 >= replStart, fail"
cogit CmpCq: (objectMemory integerObjectOf: 0) R: repStartReg.
jumpOutOfBounds2 := cogit JumpLess: 0.

If this is equal if should jump out of bounds.



On Sun, Nov 26, 2017 at 9:53 PM, Clément Bera <bera.clement at gmail.com>
wrote:

> Bug seems to be with underflow access on replacement array:
>
> (1 to: 10) collect: [:i| ['123456789' replaceFrom: 1 to: 4 with:
> 'abcdefgh' startingAt: 0] on: Error do: ['error']]
> #('error' ' abc56789' ' abc56789' ' abc56789' ' abc56789' ' abc56789' '
> abc56789' ' abc56789' ' abc56789' ' abc56789').
>
> Same thing on arrays since this is common code...
>
> Generated code looks ok... I need to look again I may have inverted some
> branches.
>
>
>
>
>
> On Sun, Nov 26, 2017 at 9:37 PM, Clément Bera <bera.clement at gmail.com>
> wrote:
>
>> Ok I have a look.
>>
>> This is on byte objects...
>>
>> On Sun, Nov 26, 2017 at 9:07 PM, Nicolas Cellier <
>> nicolas.cellier.aka.nice at gmail.com> wrote:
>>
>>>
>>> Like reported on travis
>>> https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/jobs/307544570
>>>
>>> the testTextReplacement3 now fails randomly.
>>> It sometimes omit to signal an Error...
>>>
>>>
>>
>>
>> --
>> Clément Béra
>> Pharo consortium engineer
>> https://clementbera.wordpress.com/
>> Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
>>
>
>
>
> --
> Clément Béra
> Pharo consortium engineer
> https://clementbera.wordpress.com/
> Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
>



-- 
Clément Béra
Pharo consortium engineer
https://clementbera.wordpress.com/
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20171126/4f83eb2a/attachment-0001.html>


More information about the Vm-dev mailing list