Branch: refs/heads/Cog Home: https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: 5cf2311c898137e610a96c905c3b638c5f8e2c69 https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5cf2311c898137e610a... Author: Eliot Miranda eliot.miranda@gmail.com Date: 2022-07-26 (Tue, 26 Jul 2022)
Changed paths: M platforms/iOS/vm/Common/Classes/sqSqueakAttributesAPI.m M platforms/iOS/vm/OSX/osExports.c M platforms/unix/vm/osExports.c
Log Message: ----------- Add a GetAttributeString to the OSX build cuz UnixOSProcessPlugin uses this to "identify the JIT" (?!?!?!?!?!) and hence decide whether to use sigaltstack.
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
vm-dev@lists.squeakfoundation.org