bugText Extractor TXR - Bugs: bug #35153, MPI OOM handling and error...

 
 

bug #35153: MPI OOM handling and error handling.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Thu 22 Dec 2011 07:33:57 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Component Version: NoneOperating System: None
Fixed Release: NonePlanned Release: None
Architecture: AllABI: All

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu 22 Dec 2011 07:33:57 PM UTC, original submission:

Firstly, the MPI library has a check-and-bail model for handling errors and has cases which explicitly free locally allocated memory when exiting. If the allocator throws on OOM, the local resurces in these higher frames will leak. In TXR, chk_malloc can throw on OOM in a way from which it may be possible to recover. I used chk_malloc for MPI, but it's not appropriate to its error recovery model. A non-throwing allocator is needed for MPI, or else MPI's functions have to be refactored to use the unwind module for cleanup.

Secondly, a cursory glance through MPI reveals that there are places where an error indication is ignored from a lower-level function. For instance I spotted a call to s_mp_grow whose return value is ignored. That kind of thing wouldn't be a problem if s_mp_grow threw an exception instead and all cleanup was handled through unwinding.

Thirdly, all the errors in MPI could be dealt with using exception handling, eliminating the mp_err return value everywhere.

Kaz Kylheku <kkylheku>
Project Administrator

 

(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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup