Marcel Taeumel uploaded a new version of FFI-Tests to project FFI:
http://source.squeak.org/FFI/FFI-Tests-mt.73.mcz
==================== Summary ====================
Name: FFI-Tests-mt.73
Author: mt
Time: 29 November 2023, 4:47:53.278887 pm
UUID: 49e2aada-9fd8-b24f-ad16-b928c59a63cd
Ancestors: FFI-Tests-eem.72
Try to rely on backwards compatible code if possible. #subsequences: is a generalization of #subStrings: only introduced in Squeak6.1alpha.
=============== Diff against FFI-Tests-eem.72 ===============
Item was changed:
----- Method: FFIPluginTests>>arm64Check (in category 'support') -----
arm64Check
"If required, mark the current test as failure to avoid segmentation fault
due to issues in older versions of the plugin code."
| ffiVersion |
(FFIPlatformDescription current isARM
and: [FFIPlatformDescription current wordSize = 8
+ and: [ffiVersion := Integer readFrom: (self pluginName subStrings: '.') last.
- and: [ffiVersion := Integer readFrom: (self pluginName subsequences: $.) last.
ffiVersion < 3309]]) ifTrue:
[self fail: 'Not supported. Segmentation fault avoided.']!
Marcel Taeumel uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-jar.447.mcz
==================== Summary ====================
Name: KernelTests-jar.447
Author: jar
Time: 25 November 2023, 12:03:56.598163 am
UUID: d84529ef-9079-324c-8aa7-5c24c76f7dc8
Ancestors: KernelTests-jr.446
test correct behavior resumption of the BCR error; complement Kernel-jar.1537, Kernel-eem.1535 and Kernel-eem.1536
=============== Diff against KernelTests-jr.446 ===============
Item was added:
+ ----- Method: ProcessTest>>testResumeWithEnsureAfterBCR (in category 'tests') -----
+ testResumeWithEnsureAfterBCR
+ "This test verifies #cannotReturn: context sender's pc has been nilled
+ before returning to make sure its code won't continue executing,
+ an unwind block will be run, and an Error will be raised.
+
+ Without nilling the pc this example would crash the VM after resumption:
+ [[^ 1] on: BlockCannotReturn do: #resume ] fork
+
+ and this example would happily execute an illegal return after resumption:
+ [[true ifTrue: [^ 1]] on: BlockCannotReturn do: #resume ] fork
+
+ Note: push a fake stack top to prevent a VM crash when running this test in
+ an image without the amended #cannotReturn:to: nilling the receiver's pc;
+ the functionality of the test is not affected by this precautionary measure. "
+
+ | expr executedReturnTwo error unwound sync |
+ expr := true.
+ executedReturnTwo := false.
+ error := false.
+ unwound := false.
+ sync := Semaphore new.
+ [ [sync signal.
+ [[expr ifTrue: [thisContext push: nil. ^1]. "see the note above"
+ executedReturnTwo := true. ^2]
+ ensure: [unwound := true]]
+ on: BlockCannotReturn
+ do: #resume]
+ on: Error
+ do: [error := true]] fork.
+ sync wait.
+ self deny: executedReturnTwo.
+ self assert: unwound.
+ self assert: error!