[aarch64-port-dev ] Help debugging problem with large code cache

Edward Nevill edward.nevill at gmail.com
Thu Dec 3 12:32:23 UTC 2015


On Thu, 2015-12-03 at 09:36 +0000, Andrew Haley wrote:
> On 03/12/15 07:41, Edward Nevill wrote:

> The code in pd_set_call_destination certainly does look wrong,
> however.  There is no guarantee at all that it points anywhere,
> so dereferencing the adrp might be wrong.  It might be that the
> logic here needs redesigning.

I believe the code is pd_set_call_destination is correct although it is fragile.

Again it is looking at the copied but not relocated code as in pd_call_destination.

However, the NativeCall::get_trampoline() method called by pd_set_call_destination checks that the destination is within the code blob before examining it.

>From NativeCall::get_trampoline()

  if (code->content_contains(bl_destination) &&
      is_NativeCallTrampolineStub_at(bl_destination))
    return bl_destination;

so code->content_contains(bl_destination) checks that the destination is within the code blob.

We know that if a trampoline exists it must be in the same code blob (that is the whole purpose of the trampoline).

Regards,
Ed.




More information about the aarch64-port-dev mailing list