[Vm-dev] BUG? A problem with callbacks that shows up in 64bits (but is on 32bits too)

Bert Freudenberg bert at freudenbergs.de
Tue Mar 14 18:31:03 UTC 2017

On Tue, Mar 14, 2017 at 9:20 AM, Clément Bera <bera.clement at gmail.com>

>> 2017-03-14 16:46 GMT+01:00 Eliot Miranda <eliot.miranda at gmail.com>:
>>>> c) fixing the primitive so that it uses the scavenge and fullGC
>>>> counters in the VM to detect if a GC occurred during one of the callbacks
>>>> and would fail the primitive [if it detected that a GC had occurred in any
>>>> of the surface functions].   The primitive would then simply be retried.
> That's clearly the best solution unless someone figures out a better d)
> solution.

+1 for failing the primitive.

Most of bitblt calls do not use the surface functions, and even the ones
that do (e.g. cairo and opengl plugins) normally do not involve FFI
callbacks, so they won't cause a GC. Hence detecting a GC and failing the
primitive is the cheapest option, and handling the failure in the image is
simple enough.

- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170314/cea165b1/attachment.html>

More information about the Vm-dev mailing list