From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20868 invoked by alias); 13 Jun 2005 01:33:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 20856 invoked by uid 22791); 13 Jun 2005 01:33:25 -0000 Received: from hiauly1.hia.nrc.ca (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 13 Jun 2005 01:33:25 +0000 Received: from hiauly1.hia.nrc.ca (hiauly1.hia.nrc.ca [127.0.0.1] (may be forged)) by hiauly1.hia.nrc.ca (8.12.9-20030917/8.12.9) with ESMTP id j5D1XKnV025521; Sun, 12 Jun 2005 21:33:20 -0400 (EDT) Received: (from dave@localhost) by hiauly1.hia.nrc.ca (8.12.9-20030917/8.12.9/Submit) id j5D1XJeJ025520; Sun, 12 Jun 2005 21:33:19 -0400 (EDT) Message-Id: <200506130133.j5D1XJeJ025520@hiauly1.hia.nrc.ca> Subject: Re: [patch] Add Ada tasking support for hppa-unknown-linux-gnu (take 2) To: charlet@adacore.com (Arnaud Charlet) Date: Mon, 13 Jun 2005 01:33:00 -0000 From: "John David Anglin" Cc: gcc-patches@gcc.gnu.org, laurent@guerby.net In-Reply-To: <20050502095415.GA65052@adacore.com> from "Arnaud Charlet" at May 2, 2005 11:54:15 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2005-06/txt/msg01087.txt.bz2 > You can check the size and alignment used by compiling the file with -gnatR3 It shows the wrong alignment. > > > Also, the alignment for atomic_lock_t seems wrong to me: you are using > > > 8 * 16, but the alignment is specified in *bytes*, not bits (a usual > > > confusion), so this value seems very high to me. Didn't you mean 16 > > > instead ? > > > > The required alignment is 16 bytes. > > So the alignment in the file is indeed wrong and should be 16 rather than > 8 * 16 Reducing the alignment to 16 causes an number of testsuite regressions. Free is being called with a bad pointer. Here is an example: Program received signal SIGSEGV, Segmentation fault. 0x409b979c in __libc_free (mem=0x67d60) at malloc.c:3348 3348 ar_ptr = arena_for_chunk(p); (gdb) bt #0 0x409b979c in __libc_free (mem=0x67d60) at malloc.c:3348 #1 0x0001da90 in <__gnat_free> (ptr=425312) at s-memory.adb:113 #2 0x0001f6f0 in system.task_primitives.operations.finalize_tcb (t=0x67d60) at s-taprop.adb:907 #3 0x0003284c in system.tasking.stages.vulnerable_complete_master (self_id=Variable "self_id" is not available. ) at s-tassta.adb:1563 #4 0x00035d2c in c41306b () at c41306b.adb:39 #5 0x000155d4 in main (argc=1, argv=3220178412, envp=3220178420) at b~c41306b.adb:190 As far as I can tell, this region of memory was never allocated by malloc but it's somehow a TCB being freed by Breakpoint 11, system.tasking.stages.vulnerable_complete_master (self_id=Variable "self_id" is not available. ) at s-tassta.adb:1563 1563 Vulnerable_Free_Task (T); (gdb) p/x T $93 = 0x67d60 Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602)