Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent behavior after BlockCannotReturn exception; fixes issue #15433 #15443

Conversation

isCzech
Copy link
Contributor

@isCzech isCzech commented Nov 19, 2023

Fixes the following examples:

[[^ 1] on: BlockCannotReturn do: #resume ] fork. "VM crash"

[[true ifTrue: [^ 1]] on: BlockCannotReturn do: #resume ] fork. "Illegal return from ^1"

Both examples will consistently cause a walk-back indicating an illegal return attempt.

@jecisc
Copy link
Member

jecisc commented Nov 19, 2023

It would be nice to add a test about this problem :)

@Ducasse
Copy link
Member

Ducasse commented Nov 19, 2023

Indeed :)

@isCzech
Copy link
Contributor Author

isCzech commented Nov 19, 2023

No doubt; I need figure out how, and safely. Aimed for some feedback in the meantime ;)

…ust open a debugger when computation terminated situation occurs
@isCzech
Copy link
Contributor Author

isCzech commented Nov 23, 2023

I guess now the solution is clean and testable. If you remove the self error part from #cannotReturn, one assertion fails, if you remove the pc := nil bit the other assertion fails and the test won't crash the system.

PS: not sure why two tests failed, seems to be unrelated.

@Ducasse
Copy link
Member

Ducasse commented Nov 23, 2023

Thanks! We will check quickly this time :)

@MarcusDenker MarcusDenker merged commit 86167ca into pharo-project:Pharo12 Nov 29, 2023
2 of 3 checks passed
@isCzech isCzech deleted the 15433-Bug-in-Context--cannotReturn-causing-VM-crash-and-illegal-return branch November 29, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants