Ticket #11762 (closed: fixed)
alloc-dealloc-mismatch (operator new [] vs operator delete)
Reported by: | Steven Hahn | Owned by: | Steven Hahn |
---|---|---|---|
Priority: | major | Milestone: | Release 3.5 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Federico Montesino Pouzols |
Description (last modified by Steven Hahn) (diff)
AddressSanitizer found an alloc-dealloc-mismatch in vtkDataSetToNonOrthogonalDataSetTest. The full error is below. Instead of fixing the delete, I think the cleaner solution is just to use std::vector<T> and hope RVO removes the extra copy.
08:02:16 ==25569== ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x60180010e280 08:02:16 #0 0x7fcd45032479 (/lib64/libasan.so.0+0x12479) 08:02:16 #1 0x55899d in vtkDataSetToNonOrthogonalDataSetTest::checkUnityTransformation(vtkUnstructuredGrid*) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h:215 08:02:16 #2 0x565bba in vtkDataSetToNonOrthogonalDataSetTest::testSimpleDataset() /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h:253 08:02:16 #3 0x565bba in TestDescription_suite_vtkDataSetToNonOrthogonalDataSetTest_testSimpleDataset::runTest() /home/builder/jenkins-linode/workspace/address_sanitizer/build/Vates/VatesAPI/vtkDataSetToNonOrthogonalDataSetTest.cpp:45 08:02:16 #4 0x74b99b in CxxTest::TestRunner::runTest(CxxTest::TestDescription&) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:94 08:02:16 #5 0x74b99b in CxxTest::TestRunner::runSuite(CxxTest::SuiteDescription&) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:79 08:02:16 #6 0x74b99b in CxxTest::TestRunner::runWorld() /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:63 08:02:16 #7 0x74eba1 in CxxTest::TestRunner::runAllTests(CxxTest::TestListener&) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:24 08:02:16 #8 0x74eba1 in CxxTest::XUnitPrinter::run() /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/XUnitPrinter.h:30 08:02:16 #9 0x74eba1 in int CxxTest::Main<CxxTest::XUnitPrinter>(CxxTest::XUnitPrinter&, int, char**) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestMain.h:106 08:02:16 #10 0x526912 in main /home/builder/jenkins-linode/workspace/address_sanitizer/build/Vates/VatesAPI/VatesAPITest_runner.cpp:27 08:02:16 #11 0x7fcd2bab7d64 in __libc_start_main (/lib64/libc.so.6+0x21d64) 08:02:16 0x60180010e280 is located 0 bytes inside of 128-byte region [0x60180010e280,0x60180010e300) 08:02:16 allocated by thread T0 here: 08:02:16 #0 0x7fcd450322c9 (/lib64/libasan.so.0+0x122c9) 08:02:16 #1 0x55846d in getRangeComp<double> /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h:168 08:02:16 #2 0x55846d in vtkDataSetToNonOrthogonalDataSetTest::checkUnityTransformation(vtkUnstructuredGrid*) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h:186 08:02:16 #3 0x565bba in vtkDataSetToNonOrthogonalDataSetTest::testSimpleDataset() /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Vates/VatesAPI/test/vtkDataSetToNonOrthogonalDataSetTest.h:253 08:02:16 #4 0x565bba in TestDescription_suite_vtkDataSetToNonOrthogonalDataSetTest_testSimpleDataset::runTest() /home/builder/jenkins-linode/workspace/address_sanitizer/build/Vates/VatesAPI/vtkDataSetToNonOrthogonalDataSetTest.cpp:45 08:02:16 #5 0x74b99b in CxxTest::TestRunner::runTest(CxxTest::TestDescription&) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:94 08:02:16 #6 0x74b99b in CxxTest::TestRunner::runSuite(CxxTest::SuiteDescription&) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:79 08:02:16 #7 0x74b99b in CxxTest::TestRunner::runWorld() /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:63 08:02:16 #8 0x74eba1 in CxxTest::TestRunner::runAllTests(CxxTest::TestListener&) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestRunner.h:24 08:02:16 #9 0x74eba1 in CxxTest::XUnitPrinter::run() /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/XUnitPrinter.h:30 08:02:16 #10 0x74eba1 in int CxxTest::Main<CxxTest::XUnitPrinter>(CxxTest::XUnitPrinter&, int, char**) /home/builder/jenkins-linode/workspace/address_sanitizer/Code/Mantid/Testing/Tools/cxxtest/cxxtest/TestMain.h:106 08:02:16 #11 0x526912 in main /home/builder/jenkins-linode/workspace/address_sanitizer/build/Vates/VatesAPI/VatesAPITest_runner.cpp:27 08:02:16 #12 0x7fcd2bab7d64 in __libc_start_main (/lib64/libc.so.6+0x21d64) 08:02:16 SUMMARY: AddressSanitizer: alloc-dealloc-mismatch ??:0 ?? 08:02:16 ==25569== HINT: if you don't care about these warnings you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0 08:02:16 ==25569== ABORTING
Change History
comment:2 Changed 5 years ago by Steven Hahn
- Status changed from new to inprogress
Refs #11762. replace owning raw pointer with std::vector<T>.
Changeset: 233a65d10330931de629c767f6802c0e2dfcf10a
comment:3 Changed 5 years ago by Steven Hahn
- Status changed from inprogress to verify
- Resolution set to fixed
This is being verified as pull request #752.
comment:4 Changed 5 years ago by Federico Montesino Pouzols
- Status changed from verify to verifying
- Tester set to Federico Montesino Pouzols
comment:5 Changed 5 years ago by Federico Montesino Pouzols
- Status changed from verifying to closed
Merge pull request #752 from mantidproject/11762_alloc-dealloc-mismatch
alloc-dealloc-mismatch in vtkDataSetToNonOrthogonalDataSetTest
Full changeset: 6231ed85c4be6b8981d4e5443002631c7d02d796
Note: See
TracTickets for help on using
tickets.