#621 Make check fails for dune-common (r5622)
Metadata
| Property | Value |
|---|---|
| Reported by | Atgeirr Flø Rasmussen (atgeirr@sintef.no) |
| Reported at | Oct 5, 2009 13:08 |
| Type | Bug Report |
| Version | Git (pre2.4) [autotools] |
| Operating System | Unspecified / All |
| Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
| Last edited at | Dec 7, 2009 17:14 |
| Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
| Closed at | Dec 7, 2009 17:14 |
| Closed in version | Unknown |
| Resolution | Fixed |
| Comment |
Description
2 failures:
FAIL: test-stack
This program demands that FiniteStack throws an exception when calling pop() on an empty stack(), whereas FiniteStack does no such thing. Suggested changes:
- Remove this requirement from test-stack.cc.
- Add checks to FiniteStack, that are only active in debug mode, make test-stack also only verify this in debug mode.
FAIL: lrutest
Program fails with the following error:
testing Dune::lru<int,double> /opt/local/include/gcc43/c++/debug/safe_iterator.h:131:error: attempt to copy-construct an iterator from a singular iterator.
This is an error triggered by the -D_GLIBCXX_DEBUG libstdc++ debug define. The error is triggered because operator[] copy constructs a default constructed mapped_type (in our case: a list iterator) which fails. I am not sure if this is a bug in libstdc++ or not, but changing the code to use insert() instead of operator[] at least avoids the issue:
--- lru.hh (revision 5622) +++ lru.hh (working copy) @@ -156,7 +156,7 @@ /* insert item as mru / iterator it = _data.insert(_data.begin(), x); / store index */
-
_index[key] = it;
-
}
_index.insert(std::make_pair(key,it)); return it->second;