[Vm-dev] Running the VM in another thread

Eliot Miranda eliot.miranda at gmail.com
Mon Feb 3 07:25:07 UTC 2020


Hi Pierce,

> On Feb 1, 2020, at 9:28 PM, Pierce Ng <pierce at samadhiweb.com> wrote:
> 
> 
> Hi Eliot and VM hackers,
> 
> I wrote the simplest pthread C program that invokes osvm_main() in a
> separate thread.
> 
> On Linux Ubuntu 18.04, with minheadless.pharo.cog.spur's
> libPharoVMCore.a and a Pharo 8 image, the program ran to completion
> printing Pharo's command line handler help on stdout.
> 
> On MacOS Mojave, the same C program separately linked to
> PharoVMCore.framework and SqueakVMCore.framework crash at the line
> bzero(abstractOpcodes, allocBytes) in compileCogMethod() in
> cogitX64SysV.c
> 
> Is this A or B?
> 
> A - Not meant to work. The VM must run on the main thread. On Linux the
> program only ran by happenstance.
> 
> B - Meant to work. Crashing on MacOS is a bug.

C. There are restrictions on interacting with the GUI on MacOS. I’m not an expert here. John McIntosh can state what the restrictions are.

I’m curious why you want to run the vm in another thread.  I’m curious what your goals are here.  There are a number of potential viable paths to take wrt the vm and threading.

> 
> Thanks. Cheers.
> 


More information about the Vm-dev mailing list