[OpenSmalltalk/opensmalltalk-vm] Some BitBlt operations read past source end (#426)

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[OpenSmalltalk/opensmalltalk-vm] Some BitBlt operations read past source end (#426)

Eliot Miranda-3

While running an assert or debug VM, I noticed repeated logs in console:

(((usqInt)sourceIndex)) < endOfSource 2132

This corresponds to failing assert: in BitBltSimulation slang

srcLongAt: idx
     <inline: #always>
     self assert: idx asUnsignedInteger < endOfSource.
     ^self long32At: idx

It is easily reproducible with this Squeak test:

BitmapStreamTests new testShortIntegerArrayReadRefStream2.

Such read past end is benign, except in rare case when we read past a page boundary and cause a SEGV!

Via LLDB or via VM SImulation, we can find that it is related to the case when we preload a word from source and next source word because we think that we need more than 1 source word to fill 1st dest word.

I have identified and hopefully fixed the bug in VMMaker.oscog-nice.2563

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/426?email_source=notifications\u0026email_token=AIJPEW3P3HYQP553A7MCOCLQJPSGZA5CNFSM4IWTI32KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLJ5YMQ", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/426?email_source=notifications\u0026email_token=AIJPEW3P3HYQP553A7MCOCLQJPSGZA5CNFSM4IWTI32KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLJ5YMQ", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>