On 25 November 2012 13:27, Ciprian Teodorov <[email protected]> wrote:
>
>
> On Sat, Nov 24, 2012 at 3:39 PM, Igor Stasenko <[email protected]> wrote:
>>
>> okay, seems like i found why:
>>
>> NBExternalAddress>>ulongAt: zeroBasedOffset put: value
>> "Store unsigned 64-bit integer into memory at (receiver's address +
>> ZERO-based offset) using native byte order.
>> Note, there is no range checking "
>>
>> It should use 32-bit values..
>> Callback code using ulongAt:put. to store single value at certain
>> address in machine code.
>> Since it stores 64-bit value instead of 32bit, it overrides the
>> instructions which follow, and of course that leads to crash.
>>
>> Trait aliases.. is wrong:
>>
>> #longAt:->#nbInt64AtOffset:. #longAt:put:->#nbInt64AtOffset:put:.
>> #ulongAt:->#nbUInt64AtOffset:. #ulongAt:put:->#nbUInt64AtOffset:put:
>>
>>
>> another reason to get rid of confusion with C types..
>>
> Yep indeed... that's the issue ... I have corrected it locally, but I cannot
> commit it (it seems I'm not in the developers list anymore):
>
yeah.. squeaksource sometimes "forgets" some metadata,
when it crashes..
i added you back.
But if you just want to fix this, and nothing else, don't bother: i
already committed the fix
as well as a lot more code..
I want to release new version of config with new great stuff. :)
> NBExternalHandle variableByteSubclass: #NBExternalAddress
> uses: TNBMemoryAccessors @ {#byteAt:->#nbInt8AtOffset:.
> #byteAt:put:->#nbInt8AtOffset:put:. #longAt:->#nbInt32AtOffset:.
> #longAt:put:->#nbInt32AtOffset:put:. #ulongAt:->#nbUInt32AtOffset:.
> #ulongAt:put:->#nbUInt32AtOffset:put:}
>
> Cheers,
> Ciprian
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
> --
> Dr. Ciprian TEODOROV
> Ingénieur Développement CAO
>
> tél : 06 08 54 73 48
> mail : [email protected]
> www.teodorov.ro
--
Best regards,
Igor Stasenko.