MantisBT - VTK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015909 | VTK | (No Category) | public | 2015-12-30 04:31 | 2016-08-12 09:55 |
Reporter | Pablo Hernandez-Cerdan | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | 6.3.0 | ||||
Target Version | Fixed in Version | ||||
Project | Release | ||||
Type | crash | ||||
Summary | 0015909: segfault in destruction of static member vtkMathInternal in vtkMath | ||||
Description | I reported first into the mail-list, but I thought was more suitable for a ticket: http://vtk.1045678.n5.nabble.com/vtkMath-segfault-td4917184.html#a5735703 [^] It seems a double destruction or wrong order of destruction of member pointer Gaussian of vtkMathInternal, which is static member of vtkMath http://stackoverflow.com/questions/6850009/c-deleting-static-data [^] suggests a smart pointer for Gaussian, or remove the destructor. vtk --version = 6.3 //vtkMath.h static vtkInternal Internal //vtkMath.cxx class vtkMathInternal { public: vtkMathInternal(); ~vtkMathInternal(); vtkMinimalStandardRandomSequence *Uniform; vtkBoxMuellerRandomSequence *Gaussian; std::vector<vtkTypeInt64> MemoizeFactorial; }; vtkMathInternal::vtkMathInternal() { this->Gaussian=vtkBoxMuellerRandomSequence::New(); // This line assumes the current vtkBoxMuellerRandomSequence behavior: // an initial vtkMinimalStandardRandomSequence is created. this->Uniform=static_cast<vtkMinimalStandardRandomSequence *>( this->Gaussian->GetUniformSequence()); this->Uniform->SetSeedOnly(1177); // One authors home address this->MemoizeFactorial.resize(21, 0); } vtkMathInternal::~vtkMathInternal() { this->Gaussian->Delete(); } vtkMathInternal vtkMath::Internal; ----------------------------------- Valgrind output: valgrind -v --leak-check=full ./google-test-with-fixture.run ... ==32109== Invalid free() / delete / delete[] / realloc() ==32109== at 0x4C2A144: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==32109== by 0x1D00781D: vtkMathInternal::~vtkMathInternal() (vtkMath.cxx:62) ==32109== Invalid read of size 4 ==32109== at 0x1518C4C1: vtkObjectBase::~vtkObjectBase() (in /usr/lib/libvtkCommonCore.so.1) ==32109== by 0x1518C588: vtkObjectBase::~vtkObjectBase() (in /usr/lib/libvtkCommonCore.so.1) ==32109== by 0x1D00781D: vtkMathInternal::~vtkMathInternal() (vtkMath.cxx:62) ==32109== by 0x164D32EE: __cxa_finalize (in /usr/lib/libc-2.22.so) ==32109== by 0x1CEE42A2: ??? (in /home/phc/devtoolset/release/VTK/lib/libvtkCommonCore-6.3.so.1) ==32109== Invalid read of size 4 ==32109== at 0x1518C13D: vtkObjectBase::UnRegisterInternal(vtkObjectBase*, int) (in /usr/lib/libvtkCommonCore.so.1) ==32109== by 0x1D00781D: vtkMathInternal::~vtkMathInternal() (vtkMath.cxx:62) ==32109== at 0x1518C1F0: vtkObjectBase::Delete() (in /usr/lib/libvtkCommonCore.so.1) ==32109== by 0x1D00781D: vtkMathInternal::~vtkMathInternal() (vtkMath.cxx:62) ==32109== Invalid read of size 8 ==32109== at 0x1518C090: vtkObjectBase::UnRegister(vtkObjectBase*) (in /usr/lib/libvtkCommonCore.so.1) ==32109== by 0x1D00781D: vtkMathInternal::~vtkMathInternal() (vtkMath.cxx:62) | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://www.vtk.org/Bug/file/9988/valgrind.out | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2015-12-30 04:31 | Pablo Hernandez-Cerdan | New Issue | |||
2015-12-30 04:31 | Pablo Hernandez-Cerdan | File Added: valgrind.out | |||
2016-07-06 10:26 | Shawn Waldon | Assigned To | => Shawn Waldon | ||
2016-07-06 10:55 | Shawn Waldon | Note Added: 0036172 | |||
2016-07-06 10:56 | Shawn Waldon | Assigned To | Shawn Waldon => | ||
2016-07-06 22:55 | Pablo Hernandez-Cerdan | Note Added: 0036318 | |||
2016-07-06 22:56 | Pablo Hernandez-Cerdan | Note Edited: 0036318 | bug_revision_view_page.php?bugnote_id=36318#r1651 | ||
2016-08-12 09:55 | Kitware Robot | Note Added: 0037442 | |||
2016-08-12 09:55 | Kitware Robot | Status | backlog => closed | ||
2016-08-12 09:55 | Kitware Robot | Resolution | open => moved | ||
2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|