[Top] [All Lists]

Re: Strange gp corruption problem

To: Mike Crowe <>
Subject: Re: Strange gp corruption problem
From: Thiemo Seufer <>
Date: Thu, 12 Jul 2007 18:21:52 +0100
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.16 (2007-06-11)
Mike Crowe wrote:
> We have a function that does some string manipulation (not
> particularly dangerous manipulation and I've been through it
> carefully) and then calls atol. As expected the prologue of this
> function calculates the value of the gp register by applying an offset
> to the t9 register which contains the address of the start of the
> function like this:
>  47995c:       3c1c0fba        lui     gp,0xfba

Looks weird as an entry point. Normally entries are 8 byte aligned.

> The only user-space reason I can come up with for this happening is if
> the caller jumped into this function one instruction late. This seems
> unlikely because t9 contains the correct value and the stack looks
> fine.

Check the value of $ra (e.g. with a gdb breakpoint) after entering the


<Prev in Thread] Current Thread [Next in Thread>