This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/61604] New: missing line numbers in a sanitizer backtrace from an OMP region
- From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jun 2014 11:24:30 +0000
- Subject: [Bug sanitizer/61604] New: missing line numbers in a sanitizer backtrace from an OMP region
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61604
Bug ID: 61604
Summary: missing line numbers in a sanitizer backtrace from an
OMP region
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: Joost.VandeVondele at mat dot ethz.ch
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
as an example, the following program with leak:
> cat test.f90
SUBROUTINE S1()
INTEGER, POINTER, DIMENSION(:) :: a
!$OMP PARALLEL DEFAULT(PRIVATE)
ALLOCATE(a(100))
!$OMP END PARALLEL
END SUBROUTINE
PROGRAM TEST
CALL S1()
END PROGRAM TEST
yields:
> gfortran -O1 -g3 -fno-omit-frame-pointer -fsanitize=leak -fopenmp test.f90 ; export OMP_NUM_THREADS=2 ; ./a.out
=================================================================
==22952==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 400 byte(s) in 1 object(s) allocated from:
#0 0x7f3b6d8ce1bc in __interceptor_malloc
../../../../gcc/libsanitizer/lsan/lsan_interceptors.cc:66
#1 0x400865 in s1_._omp_fn.0 (/data/vjoost/gnu/bugs/a.out+0x400865)
#2 0x7f3b6e52463e in GOMP_parallel ../../../gcc/libgomp/parallel.c:167
Direct leak of 400 byte(s) in 1 object(s) allocated from:
#0 0x7f3b6d8ce1bc in __interceptor_malloc
../../../../gcc/libsanitizer/lsan/lsan_interceptors.cc:66
#1 0x400865 in s1_._omp_fn.0 (/data/vjoost/gnu/bugs/a.out+0x400865)
#2 0x7f3b6e52776d in gomp_thread_start ../../../gcc/libgomp/team.c:117
SUMMARY: LeakSanitizer: 800 byte(s) leaked in 2 allocation(s).
unfortunately, there are no line numbers but only
#1 0x400865 in s1_._omp_fn.0 (/data/vjoost/gnu/bugs/a.out+0x400865)
making it hard to find the location of the allocate, in complex code.