From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89570 invoked by alias); 27 Apr 2015 14:19:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 89493 invoked by uid 48); 27 Apr 2015 14:19:16 -0000 From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/65904] New: Memory corruption with acc_shutdown, nvptx offloading, libgomp.oacc-c-c++-common/asyncwait-1.c Date: Mon, 27 Apr 2015 14:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: unknown X-Bugzilla-Keywords: openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jules at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02290.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65904 Bug ID: 65904 Summary: Memory corruption with acc_shutdown, nvptx offloading, libgomp.oacc-c-c++-common/asyncwait-1.c Product: gcc Version: unknown Status: UNCONFIRMED Keywords: openacc Severity: normal Priority: P3 Component: libgomp Assignee: jules at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- Seems to have appeared with the "recent" libgomp changes (r221878, r221922). *** glibc detected *** ./asyncwait-1.exe: double free or corruption (!prev): 0x0000000001cfdcf0 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x2ac3b574bb96] [...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs/libgomp.so.1(+0x153dd)[0x2ac3b52a33dd] [...]/build-gcc/x86_64-unknown-linux-gnu/./libgomp/.libs/libgomp.so.1(acc_shutdown+0x115)[0x2ac3b52a57a5] ./asyncwait-1.exe[0x40333d] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x2ac3b56ee76d] ./asyncwait-1.exe[0x400fb9] ======= Memory map: ======== [...] Valgrind reports: [...] ==24645== Invalid read of size 8 ==24645== at 0x60A53C8: gomp_free_memmap (target.c:914) ==24645== by 0x60A77A4: acc_shutdown (oacc-init.c:229) ==24645== by 0x402254: main (in [...]/asyncwait-1.exe) ==24645== Address 0xda94f78 is 88 bytes inside a block of size 1,512 free'd ==24645== at 0x4C2A739: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24645== by 0x60A53DC: gomp_free_memmap (target.c:917) ==24645== by 0x60A77A4: acc_shutdown (oacc-init.c:229) ==24645== by 0x402254: main (in [...]/asyncwait-1.exe) [...]