Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3350.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3350 Author: eem Time: 15 February 2024, 1:18:23.815793 pm UUID: b14d789f-780b-49f2-91aa-d50085ca62e6 Ancestors: VMMaker.oscog-eem.3349
Fix regression introduced in VMMaker.oscog-eem.3349 by adding a disownVM:/ownVM: pair to the SSL connnect primitive.
=============== Diff against VMMaker.oscog-eem.3349 ===============
Item was changed: ----- Method: StackInterpreter>>disownVM: (in category 'vm scheduling') ----- disownVM: flags <public> <inline: false> "Release the VM to other threads and answer the current thread's index. Currently valid flags for the non-threaded VM are: + DisownVMForThreading - allow the VM to thread-switch; this is ignored DisownVMLockOutFullGC - prevent fullGCs while this thread disowns the VM + DisownVMForFFICall - informs the VM that it is entering an FFI call - DisownVMForFFICall - informs the VM that it is entering an FFI call
This is the entry-point for plugins and primitives that wish to release the VM while performing some operation that may potentially block, and for callbacks returning back to some blocking operation. While this exists for the threaded FFI VM we use it to reset newMethod and the argumentCount after a callback." self assert: primFailCode = 0.
+ flags = DisownVMForThreading ifTrue: + [^0]. + "Hack encodings of client state. We use non-immediates (bottom three bits clear) for FFI/Plugin doing save := self disownVM: FLAGS. ... callout ... self ownVM: save. We use immediate integer (bottom bit 1) for callbacks doing save := self ownVM: 0. ... callback ... self disownVM: save. return to C" self assert: ((objectMemory isImmediate: flags) ifFalse: [flags = (flags bitAnd: DisownVMForFFICall+DisownVMForThreading) and: [flags anyMask: DisownVMForFFICall]] ifTrue: [(objectMemory isIntegerObject: flags) and: [(objectMemory integerValueOf: flags) between: 0 and: (self argumentCountOfMethodHeader: -1)]]).
"If DisownVMForFFICall this is from the FFI plugin and we're making a callout; remember the fact." (((objectMemory isImmediate: flags)) not and: [flags anyMask: DisownVMForFFICall]) ifTrue: [self assert: ((objectMemory isOopCompiledMethod: newMethod) and: [(self argumentCountOf: newMethod) = argumentCount]). inFFIFlags := DisownVMForFFICall. ^flags].
self assert: ((objectMemory isIntegerObject: flags) and: [(objectMemory integerValueOf: flags) between: 0 and: (self argumentCountOfMethodHeader: -1)]).
"Otherwise this is a callback return; restore argumentCount and newMethod as per the ownVM: on callback." argumentCount := objectMemory integerValueOf: flags. newMethod := self popStack. self assert: ((objectMemory isOopCompiledMethod: newMethod) and: [(self argumentCountOf: newMethod) = argumentCount]). ^0!
vm-dev@lists.squeakfoundation.org