[FIX] Exception>>isNested
Robert Withers
withers at vnet.net
Fri Jan 14 16:20:20 UTC 2000
Paul,
This sounds like quite an educational experience to me and it is an area
I am not too familiar with (was it #nonLocalReturn?). Could you guys
continue to post through the list or cc me into your offline please?
Thanks,
Rob
Paul McDonough wrote:
>
> Stephen -
>
> It looks to me not like a bug, but rather that you got bit by one of the
> "subtleties" of the ANSI spec. Specifically, the handler blocks in your
> test methods do not terminate in explicit handler actions (e.g., resume,
> return, resignal, etc.). In that case, the action taken is return -
> i.e., terminate evaluation of the protected block and return control to
> its sender. When I ran your tests, it looks like that's what's
> happening, and that's correct.
>
> Oddly though, when I ran the tests (updated 2.7 image, minus the most
> recent exception fix), the output printed in my transcript was what you
> said you expected but did *not* get. This discrepency feels a little
> creepy to me, especially around inherently weird places like exceptions,
> so I'd appreciate it if you could rerun your tests some time and drop me
> a line if you still see the trouble.
>
> Also, shall we take this offline for a bit, so's not to bore the
> newsgroup with the details as we try to see what's up here?
>
> Thanks for beating on it a bit ... exceptions (imho) really need to be
> 100% bug-free, and so far they probably ain't.
>
> Paul
> (ps - in case anyone out there is feeling particularly Terse, there's
> still too much code in Exception and its friends ...)
>
> Stephen Pair wrote:
> >
> > > Stephen:
> > >
> > > This bug would have left you in the hands of the wrong exception
> > > handler, which has nothing to do with method returns per se, so I think
> > > the answer is "no". You could have run into a hole in the
> > > ensured-execution machinery, though - I don't specifically know of any
> > > bugs in there, but it is one of the more twisted areas in the code, so I
> > > wouldn't be surprised to find one.
> > >
> > > I would appreciate hearing about any remaining problems after you
> > > install the fix - test cases that expose bugs are not always easy to
> > > think of!
> > >
> > > Cheers,
> > > Paul
> >
> > Ok, I built a little test case to see if the problem has been corrected. I
> > ran the test to verify that it reproduces the bug, then I filed in your fix,
> > and the bug appears to still be there.
> >
> > I've attached a change set that reproduces the bug. Some instructions are
> > in the preamble. Load it and execute "ExTest test."
> >
> > The method #test calls #test2. After the inner handler handles the
> > exception, an inspection of the call stack reveals that the caller of #test2
> > is: "[] in MenuItemMorph>>mouseUp:"! I've put a commented line in #test2
> > that you can uncomment to get the debugger that shows this scenario.
> >
> > Thus, #test2 never returns execution to #test (and the rest of #test never
> > executes).
> >
> > I should have reported this issue a few weeks ago, but didn't get around to
> > it (sorry).
> >
> > Thanks,
> > Stephen
> >
> > ------------------------------------------------------------------------
> > Name: ExceptionTest.cs
> > ExceptionTest.cs Type: unspecified type (application/octet-stream)
> > Encoding: quoted-printable
More information about the Squeak-dev
mailing list
|