Mike Crowe wrote:
[snip]
> 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.
[snip]
> 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
function.
Thiemo
|