[llvm-bugs] [Bug 50625] New: Memory leak for detachable tasks
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 8 13:04:58 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50625
Bug ID: 50625
Summary: Memory leak for detachable tasks
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 3 consistent memory leaks for each of:
libomp :: tasking/kmp_detach_tasks_t1.c
libomp :: tasking/kmp_detach_tasks_t2.c
libomp :: tasking/kmp_detach_tasks_t3.c
libomp :: tasking/omp_detach_taskwait.c
Direct leak of 352 byte(s) in 1 object(s) allocated from:
#0 0x49556d in malloc compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x2b9670136d61 in ___kmp_allocate_align(unsigned long, unsigned long,
char const*, int) llvm-project/openmp/runtime/src/kmp_alloc.cpp:1849:25
#2 0x2b96701323ca in ___kmp_allocate
llvm-project/openmp/runtime/src/kmp_alloc.cpp:1903:9
#3 0x2b96702a59ae in __kmp_allocate_task_team(kmp_info*, kmp_team*)
llvm-project/openmp/runtime/src/kmp_tasking.cpp:3440:36
#4 0x2b967029389d in __kmp_task_team_setup
llvm-project/openmp/runtime/src/kmp_tasking.cpp:3590:9
#5 0x2b96702910ae in __kmp_task_alloc
llvm-project/openmp/runtime/src/kmp_tasking.cpp:1257:7
#6 0x2b967029567a in __kmpc_omp_task_alloc
llvm-project/openmp/runtime/src/kmp_tasking.cpp:1438:12
#7 0x4c57ea in .omp_outlined._debug__
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:108:21
#8 0x4c5dc4 in .omp_outlined..1
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:94:3
#9 0x2b967044b682 in __kmp_invoke_microtask
llvm-project/openmp/runtime/src/z_Linux_asm.S:1166
#10 0x2b96701f4ad0 in __kmp_fork_call
llvm-project/openmp/runtime/src/kmp_runtime.cpp:1851:13
#11 0x2b96701a1512 in __kmpc_fork_call
llvm-project/openmp/runtime/src/kmp_csupport.cpp:307:5
#12 0x4c5384 in main
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:94:3
#13 0x2b9670958554 in __libc_start_main
/usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266
Indirect leak of 2144 byte(s) in 1 object(s) allocated from:
#0 0x49556d in malloc compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x2b9670136d61 in ___kmp_allocate_align(unsigned long, unsigned long,
char const*, int) llvm-project/openmp/runtime/src/kmp_alloc.cpp:1849:25
#2 0x2b96701323ca in ___kmp_allocate
llvm-project/openmp/runtime/src/kmp_alloc.cpp:1903:9
#3 0x2b967029508d in __kmp_alloc_task_deque(kmp_info*, kmp_thread_data*)
llvm-project/openmp/runtime/src/kmp_tasking.cpp:3260:49
#4 0x2b96702913dc in __kmp_task_alloc
llvm-project/openmp/runtime/src/kmp_tasking.cpp:1275:9
#5 0x2b967029567a in __kmpc_omp_task_alloc
llvm-project/openmp/runtime/src/kmp_tasking.cpp:1438:12
#6 0x4c57ea in .omp_outlined._debug__
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:108:21
#7 0x4c5dc4 in .omp_outlined..1
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:94:3
#8 0x2b967044b682 in __kmp_invoke_microtask
llvm-project/openmp/runtime/src/z_Linux_asm.S:1166
#9 0x2b96701f4ad0 in __kmp_fork_call
llvm-project/openmp/runtime/src/kmp_runtime.cpp:1851:13
#10 0x2b96701a1512 in __kmpc_fork_call
llvm-project/openmp/runtime/src/kmp_csupport.cpp:307:5
#11 0x4c5384 in main
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:94:3
#12 0x2b9670958554 in __libc_start_main
/usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266
Indirect leak of 288 byte(s) in 1 object(s) allocated from:
#0 0x49556d in malloc compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
#1 0x2b9670136d61 in ___kmp_allocate_align(unsigned long, unsigned long,
char const*, int) llvm-project/openmp/runtime/src/kmp_alloc.cpp:1849:25
#2 0x2b96701323ca in ___kmp_allocate
llvm-project/openmp/runtime/src/kmp_alloc.cpp:1903:9
#3 0x2b96702b464c in __kmp_realloc_task_threads_data(kmp_info*,
kmp_task_team*) llvm-project/openmp/runtime/src/kmp_tasking.cpp:3357:48
#4 0x2b9670294924 in __kmp_enable_tasking(kmp_task_team*, kmp_info*)
llvm-project/openmp/runtime/src/kmp_tasking.cpp:3151:20
#5 0x2b96702912d8 in __kmp_task_alloc
llvm-project/openmp/runtime/src/kmp_tasking.cpp:1270:7
#6 0x2b967029567a in __kmpc_omp_task_alloc
llvm-project/openmp/runtime/src/kmp_tasking.cpp:1438:12
#7 0x4c57ea in .omp_outlined._debug__
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:108:21
#8 0x4c5dc4 in .omp_outlined..1
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:94:3
#9 0x2b967044b682 in __kmp_invoke_microtask
llvm-project/openmp/runtime/src/z_Linux_asm.S:1166
#10 0x2b96701f4ad0 in __kmp_fork_call
llvm-project/openmp/runtime/src/kmp_runtime.cpp:1851:13
#11 0x2b96701a1512 in __kmpc_fork_call
llvm-project/openmp/runtime/src/kmp_csupport.cpp:307:5
#12 0x4c5384 in main
llvm-project/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c:94:3
#13 0x2b9670958554 in __libc_start_main
/usr/src/debug/glibc-2.17-c758a686/csu/../csu/libc-start.c:266
SUMMARY: AddressSanitizer: 2784 byte(s) leaked in 3 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/27f6f94c/attachment-0001.html>
More information about the llvm-bugs
mailing list