Saturday, August 23, 2014

Exceptions fixed in Squeak, Pharo and Cuis

Martin McClure just integrated the Pharo exceptions fix we worked on during Camp Smalltalk.  I imagine this fix, in 5 slices, should be straightforward to port to Squeak and Cuis.

Update: I ported the Pharo fix to Cuis.


Anonymous said...

Can you give a URL to the fix that is not behind a login?

Andrés said...

I'm not sure it's a good idea to put direct links to the .mcz files in public (because then the links have to be permalinks etc). But if you send me a note with some contact information, I can forward those URLs directly to you.

Alan Lovejoy said...

Hi Andreas,

When and how was this bug discovered?

And what is the bug? And how was it fixed?


Andrés said...


The bug was discovered and documented years ago. I suppose it was discovered in the context of something that deals with exceptions a lot, I do not know exactly what was it. The bug is that handlers were always sought from the top of the stack, even while handling exceptions with blocks homed far below the top of the stack (and potentially below other handlers). The result was that the wrong handler would take care of exceptions. In a nutshell, it was fixed by having handler evaluation mark the stack with primitive 199. This is distinguished from the on:do: use of primitive 199 by looking at the frame's method selector.

nicolas cellier said...

I've updated the issue: i've also a fix in Squeak inbox since June.
Note that the test is from Andreas Raab, but I don't remember who really discovered the bug...