[squeak-dev] The Inbox: Kernel-jar.1404.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 12 11:10:49 UTC 2021


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-jar.1404.mcz

==================== Summary ====================

Name: Kernel-jar.1404
Author: jar
Time: 12 May 2021, 1:10:44.824502 pm
UUID: 8ca0f049-7c9d-ac43-befc-828adc37e6bd
Ancestors: Kernel-nice.1402

Prevent VM crashes due to returning from #cannotReturn. The fix loops #cannotReturn to itself so that the user cannot crash the VM by accidentally pressing Proceed, by stepping over etc.

#terminate can take advantage of this improved behavior - will post a proposal in a separate changeset.

=============== Diff against Kernel-nice.1402 ===============

Item was changed:
  ----- Method: Context>>cannotReturn: (in category 'private-exceptions') -----
  cannotReturn: result
+ 	"Note: BlockCannotReturn is looped back because returning to thisContext's sender (i.e. to self) wouldn't make sense and would crash the VM - the sender's pc was set to endPC+1 because the sender attempted an illegal non-local return (to a dead context or a to context on another stack). This message is sent by the VM or during simulation."
  
+ 	closureOrNil ifNotNil: [self cannotReturn: result to: self home sender. thisContext privRefresh].
- 	closureOrNil ifNotNil: [^ self cannotReturn: result to: self home sender].
  	Processor debugWithTitle: 'Computation has been terminated!!' translated full: false.!



More information about the Squeak-dev mailing list