Skip to content

Memory leak in iree/vm:native_module_test #3122

Closed

Description

@hanhanW

When importing into google branch, I see the test fails with ASAN config. This test was added in go/iree-pull/3091

Direct leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x562d4f497a22 in calloc third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
    #1 0x7fc6ef5fd7e0 in iree_allocator_system_allocate third_party/iree/iree/base/api.c:872:13
    #2 0x7fc6ef5fd505 in iree_allocator_malloc third_party/iree/iree/base/api.c:829:10
    #3 0x7fc6f2a6d2ea in module_b_alloc_state(void*, iree_allocator_t, iree_vm_module_state**) third_party/iree/iree/vm/native_module_test.h:187:3
    #4 0x7fc6f122ce77 in iree_vm_native_module_alloc_state third_party/iree/iree/vm/native_module.c:237:12
    #5 0x7fc6f224250e in iree_vm_context_register_modules third_party/iree/iree/vm/context.c:373:9
    #6 0x7fc6f2241a94 in iree_vm_context_create_with_modules third_party/iree/iree/vm/context.c:230:7
    #7 0x7fc6f2a6b6ae in iree::(anonymous namespace)::VMNativeModuleTest::SetUp() third_party/iree/iree/vm/native_module_test.cc:48:5
    #8 0x7fc6eeb86f0b in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2580:10
    #9 0x7fc6eeb6475d in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2635:12
    #10 0x7fc6eeb4697b in testing::Test::Run() third_party/googletest/googletest/src/gtest.cc:2650:3
    #11 0x7fc6eeb4757e in testing::TestInfo::Run() third_party/googletest/googletest/src/gtest.cc:2832:11
    #12 0x7fc6eeb48170 in testing::TestSuite::Run() third_party/googletest/googletest/src/gtest.cc:2986:28
    #13 0x7fc6eeb57a04 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/googletest/src/gtest.cc:5697:44
    #14 0x7fc6eeb8f0cb in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2580:10
    #15 0x7fc6eeb674fd in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2635:12
    #16 0x7fc6eeb57356 in testing::UnitTest::Run() third_party/googletest/googletest/src/gtest.cc:5280:10
    #17 0x7fc6f0218dc5 in RUN_ALL_TESTS() third_party/googletest/googletest/include/gtest/gtest.h:2490:46
    #18 0x7fc6f0218d11 in main third_party/iree/iree/testing/gtest_main.cc:22:10
    #19 0x7fc6ce643bbc in __libc_start_main (/usr/grte/v4/lib64/libc.so.6+0x38bbc)
    #20 0x562d4f3fbc28 in _start /usr/grte/v4/debug-src/src/csu/../sysdeps/x86_64/start.S:108
 
Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x562d4f497a22 in calloc third_party/llvm/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:154:3
    #1 0x7fc6ef5fd7e0 in iree_allocator_system_allocate third_party/iree/iree/base/api.c:872:13
    #2 0x7fc6ef5fd505 in iree_allocator_malloc third_party/iree/iree/base/api.c:829:10
    #3 0x7fc6f2a6ccc9 in module_b_create(iree_allocator_t, iree_vm_module**) third_party/iree/iree/vm/native_module_test.h:281:3
    #4 0x7fc6f2a6b525 in iree::(anonymous namespace)::VMNativeModuleTest::SetUp() third_party/iree/iree/vm/native_module_test.cc:42:5
    #5 0x7fc6eeb86f0b in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2580:10
    #6 0x7fc6eeb6475d in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2635:12
    #7 0x7fc6eeb4697b in testing::Test::Run() third_party/googletest/googletest/src/gtest.cc:2650:3
    #8 0x7fc6eeb4757e in testing::TestInfo::Run() third_party/googletest/googletest/src/gtest.cc:2832:11
    #9 0x7fc6eeb48170 in testing::TestSuite::Run() third_party/googletest/googletest/src/gtest.cc:2986:28
    #10 0x7fc6eeb57a04 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/googletest/src/gtest.cc:5697:44
    #11 0x7fc6eeb8f0cb in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2580:10
    #12 0x7fc6eeb674fd in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) third_party/googletest/googletest/src/gtest.cc:2635:12
    #13 0x7fc6eeb57356 in testing::UnitTest::Run() third_party/googletest/googletest/src/gtest.cc:5280:10
    #14 0x7fc6f0218dc5 in RUN_ALL_TESTS() third_party/googletest/googletest/include/gtest/gtest.h:2490:46
    #15 0x7fc6f0218d11 in main third_party/iree/iree/testing/gtest_main.cc:22:10
    #16 0x7fc6ce643bbc in __libc_start_main (/usr/grte/v4/lib64/libc.so.6+0x38bbc)
    #17 0x562d4f3fbc28 in _start /usr/grte/v4/debug-src/src/csu/../sysdeps/x86_64/start.S:108

Activity

  1. self-assigned this
    on Sep 11, 2020
  2. added
    bug 🐞
    runtime
    on Sep 11, 2020
  3. added this to the milestone on Sep 11, 2020
  4. added a commit that references this issue on Sep 12, 2020
  5. added a commit that references this issue on Sep 12, 2020
  6. added a commit that references this issue on Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐞runtime

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions