This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bad unwinder data for __kernel_sigtramp_rt64 in PPC 64 vDSO corrupts Condition Register


On Tue, Oct 16, 2007 at 07:22:31PM +0100, Andrew Haley wrote:
>  > and similarly linux-unwind.h should do:
>  > 
>  >     fs->regs.reg[R_CR2].loc.offset = (long) &regs->ccr - new_cfa;
>  >     /* CR? regs are just 32-bit and PPC is big-endian.  */
>  >     fs->regs.reg[R_CR2].loc.offset += sizeof (long) - 4;
> 
> Won't this generate an alignment fault?

Why?  The reg size is 32-bit, so it only should be read/written
as 32-bit value.
E.g. a brief look at _Unwind_RaiseException shows:
	lwz 12,5656(1)
...
        mtcrf 32,12      #,
        ld 15,5368(1)    #,
        ld 16,5376(1)    #,
        mtcrf 16,12      #,
        ld 17,5384(1)    #,
        ld 18,5392(1)    #,
        mtcrf 8,12       #,
so it shouldn't have any problems with 4 byte alignment (rather than 8 byte
alignment).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]