[Vm-dev] BitBltSimulator assertion failure

Alistair Grant akgrant0710 at gmail.com
Wed Oct 17 20:04:37 UTC 2018


Hi Eliot,

On Wed, 17 Oct 2018 at 18:37, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> On Wed, Oct 17, 2018 at 9:28 AM Alistair Grant <akgrant0710 at gmail.com> wrote:
>>
>> If I try to run Pharo with the latest VMMaker (eem.2460) it results in the
>> following error in BitBltSimulator.  Does this look familiar?
>
>
> Yes.  I am working on fixing a bug in BitBlt where the copyBits primitive accesses a word past the end of the source bitmap.  If the source bitmap is an external surface and abuts the end of a page then accessing the word beyond the bitmap will cause an access violation and crash the VM.  I have added asserts to catch the bug before it crashes the VM.  Until I have the bug fixed you'll have to tolerate the assert fails.  In the simulator you can use an exception handler to squash the asserts, e.g.
>
> | sis m |
> sis := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur32BitMemoryManager).
> m := BitBltSimulation>>#copyBitsLockedAndClipped.
> sis desiredNumStackPages: 8.
> sis assertValidExecutionPointersAtEachStep: false.
> sis openOn: '/Users/eliot/Squeak/Squeak5.2/bitbltbug'.
> sis openAsMorph.
> [sis run]
> on: AssertionFailure
> do: [:ex|
> ex signalerContext sender sender sender sender sender method ~~ m ifTrue: [ex pass].
> ex resume: nil]

Thanks!  I don't think I would have come up with this work-around.

Interestingly the image runs successfully with the CogVMSimulator, but
just ends up in the idle loop when using StackInterpreterSimulator.
Anyway, I want to focus on finishing off FileAttributesPlugin first.

Thanks again,
Alistair


More information about the Vm-dev mailing list