Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AddressSanitizer: fix alloc-dealloc-mismatch (operator new [] vs oper…
…ator delete) (pxscene#892) ==14719==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x626000021100 #0 0x7f45904e5fd0 in operator delete(void*) (/lib64/libasan.so.4+0xe0fd0) topcoderinc#1 0x4e1b95 in pxContextTest::textureMemoryOverflowTrueTest() pxCore/tests/pxScene2d/test_pxcontext.cpp:179 topcoderinc#2 0x4e1b95 in pxContextTest_pxContextTests_Test::TestBody() pxCore/tests/pxScene2d/test_pxcontext.cpp:315 topcoderinc#3 0x80ccbe in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2402 topcoderinc#4 0x80ccbe in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2438 topcoderinc#5 0x7d2bad in testing::Test::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2474 topcoderinc#6 0x7d2d92 in testing::TestInfo::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2656 topcoderinc#7 0x7d3266 in testing::TestCase::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2774 topcoderinc#8 0x7d7c85 in testing::internal::UnitTestImpl::RunAllTests() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:4649 topcoderinc#9 0x7d82cf in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2402 topcoderinc#10 0x7d82cf in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2438 topcoderinc#11 0x7d82cf in testing::UnitTest::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:4257 topcoderinc#12 0x4b627a in RUN_ALL_TESTS() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/include/gtest/gtest.h:2233 topcoderinc#13 0x4b627a in main pxCore/tests/pxScene2d/pxscene2dtestsmain.cpp:101 topcoderinc#14 0x7f458a716009 in __libc_start_main (/lib64/libc.so.6+0x21009) topcoderinc#15 0x4c6df9 in _start (pxCore/tests/pxScene2d/pxscene2dtests+0x4c6df9) 0x626000021100 is located 0 bytes inside of 10000-byte region [0x626000021100,0x626000023810) allocated by thread T0 here: #0 0x7f45904e5318 in operator new[](unsigned long) (/lib64/libasan.so.4+0xe0318) topcoderinc#1 0x4e182d in pxContextTest::textureMemoryOverflowTrueTest() pxCore/tests/pxScene2d/test_pxcontext.cpp:176 topcoderinc#2 0x4e182d in pxContextTest_pxContextTests_Test::TestBody() pxCore/tests/pxScene2d/test_pxcontext.cpp:315 topcoderinc#3 0x80ccbe in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2402 topcoderinc#4 0x80ccbe in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2438 topcoderinc#5 0x7d2bad in testing::Test::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2474 topcoderinc#6 0x7d2d92 in testing::TestInfo::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2656 topcoderinc#7 0x7d3266 in testing::TestCase::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2774 topcoderinc#8 0x7d7c85 in testing::internal::UnitTestImpl::RunAllTests() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:4649 topcoderinc#9 0x7d82cf in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2402 topcoderinc#10 0x7d82cf in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:2438 topcoderinc#11 0x7d82cf in testing::UnitTest::Run() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/src/gtest.cc:4257 topcoderinc#12 0x4b627a in RUN_ALL_TESTS() pxCore/tests/pxScene2d/../../examples/pxScene2d/external/gtest/googletest/include/gtest/gtest.h:2233 topcoderinc#13 0x4b627a in main pxCore/tests/pxScene2d/pxscene2dtestsmain.cpp:101 topcoderinc#14 0x7f458a716009 in __libc_start_main (/lib64/libc.so.6+0x21009) SUMMARY: AddressSanitizer: alloc-dealloc-mismatch (/lib64/libasan.so.4+0xe0fd0) in operator delete(void*)
- Loading branch information