#1066 fmatrix_assigner (dune/common/fassign.hh) not exception safe
Metadata
Property | Value |
---|---|
Reported by | Markus Blatt (markus@dr-blatt.de) |
Reported at | Apr 12, 2012 13:47 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Markus Blatt (markus@dr-blatt.de) |
Last edited at | Sep 5, 2012 17:54 |
Closed by | Markus Blatt (markus@dr-blatt.de) |
Closed at | Sep 5, 2012 17:54 |
Closed in version | 2.3 |
Resolution | Fixed |
Comment | in revision 6780 of dune-common |
Description
The current inplementation of the fmatrix_assigner is not exception safe, e.g. in the testcase dune/common/test/testfassign_fail3 an expception is thrown in endrow() and afterwards the destructor of fmatrix_asigner is called during stack unwinding, which throws another exception resulting in aborting the program.
We (Joe and I) propose the following changes:
- Remove the checks in the destructor such that it never throws.
- Change the semantics of assign expression. Namely introduce a marker for the end of the input (e.g. endmatrix in concordance to endrow)
- Implement the checks, that were previuously made in the destructor, in a new method that is called when endmatrix is passed.
Thus endmatrix is optional. If it is used all the previous checks will be performed. If not, the last row is not checked.
Objections, suggestions?