Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 833bc124c29fc8573b386eca4c24b94d1f96a1a5
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/833bc124c29fc8573b…
Author: Marcel Taeumel <marcel.taeumel(a)hpi.de>
Date: 2023-12-11 (Mon, 11 Dec 2023)
Changed paths:
M platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m
Log Message:
-----------
For macOS, support applicationSupportsSecureRestorableState to avoid warning on modern macOS (12+), Intel-based platforms. Thanks Juan for the hint!
Looks like I need to take a deep dive into each of these, but I am
getting odd breakages on Aarch64 Linux SoCs.
In each case,
I am updating Linux to latest, building a VM on local machine from
sources at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/202311211431
downloading a Squeak image from Squeak.org:
https://files.squeak.org/6.0/Squeak6.0-22104-64bit/Squeak6.0-22104-64bit.zip
updating Squeak to latest (22142) and running all unit tests.
Synopis:
----Raspberry Pi 4/Aarch64/Raspian Linux----
5376 run in 0:00:15:56.159,
5289 passes, 51 expected failures,
24 failures, 12 errors, 0 unexpected passes
--------------------------------------------
---------PineBook/Aarch64/Manjaro Linux-----
5376 run in 0:00:10:17.503,
5305 passes, 51 expected failures,
19 failures, 1 errors, 0 unexpected passes
--------------------------------------------
-------LePotato/Aarch64/Armbian Linux-------
5376 run in 0:00:19:24.591,
5266 passes, 51 expected failures,
45 failures, 14 errors, 0 unexpected passes
-------------------------------------------
I am noting console reports, usually SSL failures, but of note:
sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot
allocate memory
Details attached.
FYI,
-KenD
Marcel Taeumel uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-mt.3345.mcz
==================== Summary ====================
Name: VMMaker.oscog-mt.3345
Author: mt
Time: 8 December 2023, 10:38:26.611445 am
UUID: d976ade6-fda9-834f-85fe-5ce5c4f45a21
Ancestors: VMMaker.oscog-mt.3344
Fixes inconsistency between setting image-header flags from within the image and then storing them in snapshots:
- preserve now officially unused 16r20 in both single-threaded and multi-threaded VMs
- fileTimesInUTC could be set but was not stored, is it actually used somewhere?
=============== Diff against VMMaker.oscog-mt.3344 ===============
Item was changed:
----- Method: CoInterpreter>>getImageHeaderFlags (in category 'image save/restore') -----
getImageHeaderFlags
"Answer the flags that are contained in the 7th long of the image header."
^fullScreenFlag "0 or 1"
+ (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag"
+ "+ (processHasThreadAffinity ifTrue: [4] ifFalse: [0]) -- see MT VM"
+ (flagInterpretedMethods ifTrue: [8] ifFalse: [0])
+ (preemptionYields ifTrue: [0] ifFalse: [16r10])
+ "+ 16r20 -- unassigned"
+ (newFinalization ifTrue: [16r40] ifFalse: [0])
+ (sendWheelEvents ifTrue: [16r80] ifFalse: [0])
+ (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100])
+ "+ 16r200 -- N.B. flag mask 16r200 is fileTimesInUTC, responded to by the FilePlugin & FileAttributesPlugin"
- "N.B. flag mask 16r200 is fileTimesInUTC, responded to by the FilePlugin & FileAttributesPlugin"
+ (upscaleDisplayIfHighDPI ifTrue: [0] ifFalse: [16r400])
+ + (imageHeaderFlags bitClear: 1+2"+4"+8+16r10"+16r20"+16r40+16r80+16r100"+16r200"+16r400) "these are any flags we do not recognize"!
- + (imageHeaderFlags bitClear: 1+2+8+16r10+16r40+16r80+16r100+16r200+16r400) "these are any flags we do not recognize"!
Item was changed:
----- Method: CoInterpreter>>setImageHeaderFlags: (in category 'internal interpreter access') -----
setImageHeaderFlags: flags
"Set an array of flags indicating various properties of the saved image, responded to on image load.
These are the same as the image header flags shifted right two bits, omitting the fullScreenFlag and float byte order flag.
Bit 0: if set, implies the image's Process class has threadAffinity as its 3rd inst var (zero relative) (meaningful to the MT VM only)
Bit 1: if set, methods that are interpreted will have the flag bit set in their header
Bit 2: if set, implies preempting a process does not put it to the back of its run queue
+ Bit 3: (unassigned)
- Bit 3: if set, implies a threaded VM will not disown the VM if owned by the GUI thread (meaningful to the MT VM only)
Bit 4: if set, implies the new finalization scheme where WeakArrays are queued
Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events
Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)
Bit 7: if set, implies file primitives (FilePlugin, FileAttributesPlugin) will answer file times in UTC not local times
Bit 8: if set, implies the VM will not upscale the display on high DPI monitors; older VMs did this by default."
flags asUnsignedInteger > 511 ifTrue:
[^self primitiveFailFor: PrimErrUnsupported].
"processHasThreadAffinity := flags anyMask: 1. specific to CoInterpreterMT"
imageHeaderFlags := (flags anyMask: 1)
ifTrue: [imageHeaderFlags bitOr: 4]
ifFalse: [imageHeaderFlags bitClear: 4].
flagInterpretedMethods := flags anyMask: 2.
preemptionYields := flags noMask: 4.
"noThreadingOfGUIThread := flags anyMask: 8.. specific to CoInterpreterMT"
imageHeaderFlags := (flags anyMask: 8)
ifTrue: [imageHeaderFlags bitOr: 32]
ifFalse: [imageHeaderFlags bitClear: 32].
newFinalization := flags anyMask: 16.
sendWheelEvents := flags anyMask: 32.
primitiveDoMixedArithmetic := flags noMask: 64.
+ "fileTimesInUTC := flags anyMask: 128. see FilePlugin & FileAttributesPlugin"
imageHeaderFlags := (flags anyMask: 128)
ifTrue: [imageHeaderFlags bitOr: 512]
ifFalse: [imageHeaderFlags bitClear: 512].
upscaleDisplayIfHighDPI := flags noMask: 256!
Item was changed:
----- Method: CoInterpreterMT>>getImageHeaderFlags (in category 'image save/restore') -----
getImageHeaderFlags
"Answer the flags that are contained in the 7th long of the image header."
^fullScreenFlag "0 or 1"
+ (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag"
+ (processHasThreadAffinity ifTrue: [4] ifFalse: [0])
+ (flagInterpretedMethods ifTrue: [8] ifFalse: [0])
+ (preemptionYields ifTrue: [0] ifFalse: [16r10])
+ "+ 16r20 -- unassigned"
- "was: noThreadingOfGUIThread ifTrue: [16r20] ifFalse: [0]); a broken idea"
+ (newFinalization ifTrue: [16r40] ifFalse: [0])
+ (sendWheelEvents ifTrue: [16r80] ifFalse: [0])
+ (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100])
"N.B. flag mask 16r200 is fileTimesInUTC, responded to by the FilePlugin & FileAttributesPlugin"
+ (upscaleDisplayIfHighDPI ifTrue: [0] ifFalse: [16r400])
+ + (imageHeaderFlags bitClear: 1+2+4+8+16r10"+16r20"+16r40+16r80+16r100"+16r200"+16r400) "these are any flags we do not recognize"!
- + (imageHeaderFlags bitClear: 16r7FF) "these are any flags we do not recognize"!
Item was changed:
----- Method: CoInterpreterMT>>setImageHeaderFlags: (in category 'internal interpreter access') -----
setImageHeaderFlags: flags
"Set an array of flags indicating various properties of the saved image, responded to on image load.
These are the same as the image header flags shifted right two bits, omitting the fullScreenFlag and float byte order flag.
Bit 0: if set, implies the image's Process class has threadAffinity as its 3rd inst var (zero relative)
Bit 1: if set, methods that are interpreted will have the flag bit set in their header
Bit 2: if set, implies preempting a process does not put it to the back of its run queue
+ Bit 3: (unassigned)
- Bit 3: unassigned; used to mean if set, implies a threaded VM will not disown the VM if owned by the GUI thread; a broken idea
Bit 4: if set, implies the new finalization scheme where WeakArrays are queued
Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events
Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)
Bit 7: if set, implies file primitives (FilePlugin, FileAttributesPlugin) will answer file times in UTC not local times
Bit 8: if set, implies the VM will not upscale the display on high DPI monitors; older VMs did this by default."
flags asUnsignedInteger > 511 ifTrue:
[^self primitiveFailFor: PrimErrUnsupported].
(flags anyMask: 8) ifTrue:
[^self primitiveFailFor: PrimErrInappropriate].
processHasThreadAffinity := flags anyMask: 1.
flagInterpretedMethods := flags anyMask: 2.
preemptionYields := flags noMask: 4.
"was: noThreadingOfGUIThread := flags anyMask: 8. a broken idea"
+ imageHeaderFlags := (flags anyMask: 8)
+ ifTrue: [imageHeaderFlags bitOr: 32]
+ ifFalse: [imageHeaderFlags bitClear: 32].
newFinalization := flags anyMask: 16.
sendWheelEvents := flags anyMask: 32.
primitiveDoMixedArithmetic := flags noMask: 64.
+ "fileTimesInUTC := flags anyMask: 128. see FilePlugin & FileAttributesPlugin"
imageHeaderFlags := (flags anyMask: 128)
ifTrue: [imageHeaderFlags bitOr: 512]
ifFalse: [imageHeaderFlags bitClear: 512].
upscaleDisplayIfHighDPI := flags noMask: 256!