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

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

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

David T Lewis
 

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
https://source.squeak.org/VMMaker/VMMaker.oscog-nice.2563.diff


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>
Reply | Threaded
Open this post in threaded view
|

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

David T Lewis
 

Closed #426.


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

<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=AIJPEW5KEFDPY5RZDTLZTCTQPOFEPA5CNFSM4IWTI32KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUKIBEGA#event-2727350808", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/426?email_source=notifications\u0026email_token=AIJPEW5KEFDPY5RZDTLZTCTQPOFEPA5CNFSM4IWTI32KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUKIBEGA#event-2727350808", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>