bugText Extractor TXR - Bugs: bug #35137, The unwind logic may have a bug...

 
 

bug #35137: The unwind logic may have a bug whereby finally code doesn't run.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Wed 21 Dec 2011 12:50:28 AM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: CorrectnessStatus: Fixed
Privacy: PublicAssigned to: Kaz Kylheku <kkylheku>
Originator Name: Open/Closed: Closed
Component Version: NoneOperating System: None
Fixed Release: NonePlanned Release: None
Architecture: AllABI: All

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 21 Dec 2011 05:05:54 AM UTC, comment #1:

I reproduced the issue with a test case, and fixed it. Now I just have to install the test case into the test suite.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.
Wed 21 Dec 2011 12:50:28 AM UTC, original submission:

The unwind-protect cleanup logic is handled by an exception frame. If the frame catches an exception, it will run its catch code first, and then the cleanup forms. But what if the catch code itself throws an exception? To prevent infinite looping, the unwind dispatcher flips the visibility flag of the catch frame to invisible. So when the unwind search continues, it will skip the catch frame. So it looks like the cleanup forms do not get done in that case.

The problem is this visibility flag. Cleanup and catching are combined into one frame type for C programming convenience, and the visibility flag enables or disables the entire frame. The visibility flag should only hide or reveal the exception catching aspect of the frame, not the cleanup. (But if this is done naively, then infinite looping will occur when cleanup code throws.) It looks like there need to be two flags, or visibility needs to have more than two values.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kkylheku (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 21 Dec 2011 05:05:54 AM UTCkkylhekuStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1