This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Add Ada tasking support for hppa-unknown-linux-gnu (take 2)
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: charlet at adacore dot com (Arnaud Charlet)
- Cc: gcc-patches at gcc dot gnu dot org, laurent at guerby dot net
- Date: Sun, 12 Jun 2005 21:33:19 -0400 (EDT)
- Subject: Re: [patch] Add Ada tasking support for hppa-unknown-linux-gnu (take 2)
> 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);
#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)
#3 0x0003284c in system.tasking.stages.vulnerable_complete_master (self_id=Variable "self_id" is not available.
#4 0x00035d2c in c41306b () at c41306b.adb:39
#5 0x000155d4 in main (argc=1, argv=3220178412, envp=3220178420)
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.
1563 Vulnerable_Free_Task (T);
(gdb) p/x T
$93 = 0x67d60
J. David Anglin firstname.lastname@example.org
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)