<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Memory leak in __kmp_initialize_info"
   href="https://bugs.llvm.org/show_bug.cgi?id=50624">50624</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Memory leak in __kmp_initialize_info
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime Library
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>protze@itc.rwth-aachen.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I compiled OpenMP runtime and tests with AddressSanitizer:

-DCMAKE_CXX_FLAGS:STRING=-fsanitize=address
-DCMAKE_C_FLAGS:STRING=-fsanitize=address
-DOPENMP_TEST_FLAGS:STRING="-g -DDEBUG -fsanitize=address"

AddressSanitizer reports a memory leak when running
openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp  :

Direct leak of 275040 byte(s) in 191 object(s) allocated from:
    #0 0x495f7d in malloc compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x2b0799ca6d61 in ___kmp_allocate_align(unsigned long, unsigned long,
char const*, int) llvm-project/openmp/runtime/src/kmp_alloc.cpp:1849:25
    #2 0x2b0799ca23ca in ___kmp_allocate
llvm-project/openmp/runtime/src/kmp_alloc.cpp:1903:9
    #3 0x2b0799d81f41 in __kmp_initialize_info(kmp_info*, kmp_team*, int, int)
llvm-project/openmp/runtime/src/kmp_runtime.cpp:4164:38
    #4 0x2b0799d85baf in __kmp_allocate_thread
llvm-project/openmp/runtime/src/kmp_runtime.cpp:4398:3
    #5 0x2b0799d5bcb3 in __kmp_allocate_team
llvm-project/openmp/runtime/src/kmp_runtime.cpp:5179:36
    #6 0x2b0799d66214 in __kmp_fork_call
llvm-project/openmp/runtime/src/kmp_runtime.cpp:1979:14
    #7 0x2b0799d11512 in __kmpc_fork_call
llvm-project/openmp/runtime/src/kmp_csupport.cpp:307:5
    #8 0x4c8a4b in main
llvm-project/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp:16:1
    #9 0x2b079a4c8554 in __libc_start_main
/usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266

Direct leak of 1440 byte(s) in 1 object(s) allocated from:
    #0 0x495f7d in malloc compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x2b0799ca6d61 in ___kmp_allocate_align(unsigned long, unsigned long,
char const*, int) llvm-project/openmp/runtime/src/kmp_alloc.cpp:1849:25
    #2 0x2b0799ca23ca in ___kmp_allocate
llvm-project/openmp/runtime/src/kmp_alloc.cpp:1903:9
    #3 0x2b0799d81f41 in __kmp_initialize_info(kmp_info*, kmp_team*, int, int)
llvm-project/openmp/runtime/src/kmp_runtime.cpp:4164:38
    #4 0x2b0799d5c5d2 in __kmp_allocate_team
llvm-project/openmp/runtime/src/kmp_runtime.cpp:5223:9
    #5 0x2b0799d66214 in __kmp_fork_call
llvm-project/openmp/runtime/src/kmp_runtime.cpp:1979:14
    #6 0x2b0799d11512 in __kmpc_fork_call
llvm-project/openmp/runtime/src/kmp_csupport.cpp:307:5
    #7 0x4c8a4b in main
llvm-project/openmp/runtime/test/tasking/hidden_helper_task/capacity_nthreads.cpp:16:1
    #8 0x2b079a4c8554 in __libc_start_main
/usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266

SUMMARY: AddressSanitizer: 276480 byte(s) leaked in 192 allocation(s).</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>