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

Add a New Comment (Rich 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 Files:

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)

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

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5