[Vm-dev] Running the VM in another thread

Tobias Pape Das.Linux at gmx.de
Sun Feb 2 19:30:55 UTC 2020


> On 02.02.2020, at 06:28, 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.
> 
> 

I'd say Neither.
macOS has certain restrictions on what has to run on the main thread, namely gui stuff, but certainly other things, too…

But that's just my quick guess.

-t




More information about the Vm-dev mailing list