[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 5cf231: Add a GetAttributeString to the OSX build cuz Unix...

David T. Lewis lewis at mail.msen.com
Wed Jul 27 02:37:02 UTC 2022


On Tue, Jul 26, 2022 at 06:10:34PM -0700, Eliot Miranda wrote:
>  
>   Log Message:
>   -----------
>   Add a GetAttributeString to the OSX build cuz UnixOSProcessPlugin uses this to
> "identify the JIT" (?!?!?!?!?!) and hence decide whether to use sigaltstack.
> 

That seems odd. UnixOSProcessPlugin does not use GetAttributeString.
Neither the code nor the comment about using it to "identify the JIT"
came from me.

It is however be used in the #needSignalstack method that was added to
the oscog branch of the plugin in 2014. This appears to be looking at
cog-specific VM attributes to figure out if it should do signal handling
differently. This was back in the days when we had just Cog (fast VM with
JIT) and the traditional interpreter VM, so I'm guessing that it may
have just been a hack to figure out which flavor of VM the plugin was
running on back then.

But this cannot possibly be a good thing. Either the OS supports sigaltstack
or it does not. That is something that would be determined at configuration
time, not as a query to the VM attributes in the running VM. And clearly
it has nothing to do with whether or not a JIT is active.

You can probably just get rid of the GetAttributeString check entirely.
The oscog branch of the plugin is only used with the opensmalltalk-vm
VMs, so you can safely assume that any signal handling requirements needed
by those VMs will also be available to the plugin.

Dave



More information about the Vm-dev mailing list