Harmony
  1. Harmony
  2. HARMONY-5365

[drlvm][classloader] memory leaks at Initialize and InsertClass at classloader.cpp while HWA run

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None

      Description

      memory leak at Initialize and InsertClass at classloader.cpp while HWA run

      svn = r607443

      While profiling a simple HWA on Harmony using
      BoundsChecker, the tool detected following memory leaks.

      m_initiatedClasses are not disposed correctly while HWA run.

      Here is stack trace:

      1)
      Memory Leak allocated by global_operator_new

      _Allocate<struct std::_Tree_nod<class std:: >::_Node> c:\program files\microsoft visual studio .net 2003\vc7\include\xmemory 34
      allocator<struct std::_Tree_nod<class std::::_Node>::allocate c:\program files\microsoft visual studio .net 2003\vc7\include\xmemory 137
      _Tree<class std::_Tmap_traits<struct>::_Buynode c:\program files\microsoft visual studio .net 2003\vc7\include\xtree 1131
      _Tree<class std::_Tmap_traits<struct >::_Insert c:\program files\microsoft visual studio .net 2003\vc7\include\xtree 915
      _Tree<class std::_Tmap_traits<struct ::insert c:\program files\microsoft visual studio .net 2003\vc7\include\xtree 501
      Insert c:\home\hy\1\trunk\working_vm\vm\vmcore\include\hashtable.h 264

      InsertClass c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 1748

      line 1748: m_initiatedClasses->Insert(clss->get_name(), clss);

      DefineClass c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 329
      LoadFromJarFile c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 1925
      LoadFromFile c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 1821
      DoLoadClass c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 1546
      LoadClass c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 1501

      2)

      Memory Leak allocated by global_operator_new.

      Initialize c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 80

      line 80: m_initiatedClasses = new ClassTable();

      Initialize c:\home\hy\1\trunk\working_vm\vm\vmcore\src\class_support\classloader.cpp 1349
      bootstrap_initial_java_classes c:\home\hy\1\trunk\working_vm\vm\vmcore\src\init\vm_init.cpp 358
      preload_classes c:\home\hy\1\trunk\working_vm\vm\vmcore\src\init\vm_init.cpp 400
      vm_init1 c:\home\hy\1\trunk\working_vm\vm\vmcore\src\init\vm_init.cpp 835
      JNI_CreateJavaVM c:\home\hy\1\trunk\working_vm\vm\vmcore\src\jni\jni.cpp 499
      C:\home\hy\1\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\java.exe!0x0000228d
      C:\home\hy\1\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\java.exe!0x00001b2d
      main C:\home\hy\1\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\java.exe!0x000000b3
      C:\home\hy\1\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\java.exe!0x000045b4
      C:\WINDOWS\system32\kernel32.dll!0x00016ff4

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ilya Leviev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development