#864 Dune's shared_ptr implementation cannot copy default-constructed shared_ptrs
Metadata
| Property | Value |
|---|---|
| Reported by | Jö Fahlke (jorrit@jorrit.de) |
| Reported at | Jan 13, 2011 12:17 |
| Type | Bug Report |
| Version | Git (pre2.4) [autotools] |
| Operating System | Unspecified / All |
| Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
| Last edited at | Jan 13, 2011 15:00 |
| Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
| Closed at | Jan 13, 2011 15:00 |
| Closed in version | Unknown |
| Resolution | Fixed |
| Comment | in dune-common 6322 |
Description
Dune's shared_ptr implementation often does not check that the rep_ member is non-null, resulting in segfaults for instance in the following code:
shared_ptr a; shared_ptr b(a); // segmentation fault
I build this as a test-case into dune/common/test/shared_ptrtest.cc (that source file generated two programs, use shared_ptrtest_dune to check Dune's reimplementation of shared_ptr).