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

 
 

bug #35153: MPI OOM handling and error handling.

Submitter:  Kaz Kylheku <kkylheku>
Submitted:  Thu 22 Dec 2011 07:33:57 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Component Version:  None Operating System:  None
Fixed Release:  None Planned Release:  None
Architecture:  * All ABI:  * All
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code