[llvm-bugs] [Bug 50624] New: Memory leak in __kmp_initialize_info

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 8 12:57:27 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50624

            Bug ID: 50624
           Summary: Memory leak in __kmp_initialize_info
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Runtime Library
          Assignee: unassignedbugs at nondot.org
          Reporter: protze at itc.rwth-aachen.de
                CC: llvm-bugs at lists.llvm.org

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).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210608/7cd77965/attachment.html>


More information about the llvm-bugs mailing list