Re: [DynInst_API:] saving registers on aarch64


Date: Fri, 27 Sep 2019 16:12:26 -0400
From: Stan Cox <scox@xxxxxxxxxx>
Subject: Re: [DynInst_API:] saving registers on aarch64

% LD_LIBRARY_PATH=/root/smoke-test/dynamic-static:/usr/lib64/dyninst DYNINSTAPI_RT_LIB=/usr/lib64/dyninst/libdyninstAPI_RT.so ./mutator-saveregs.x -dynamic hello.x 31 registers available: r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 arg[1]=reg[0] arg[2]=reg[1] arg[3]=reg[2] arg[4]=reg[3] arg[5]=reg[4] arg[6]=reg[5] arg[7]=reg[6] arg[1]=reg[7] arg[2]=reg[8] arg[3]=reg[9] arg[4]=reg[10] arg[5]=reg[11] arg[6]=reg[12] arg[7]=reg[13] arg[1]=reg[14] arg[2]=reg[15] arg[3]=reg[16] arg[4]=reg[17] arg[5]=reg[18] arg[6]=reg[19] arg[7]=reg[20]
Mutation done. Running mutatee
In main 0xffffaf1a3e30 0x874 0xffffaf1c0c80 0x420018 0x100 0x400808 0
In main 0 0x11f46148dc97db00 0 0 0x2b440346 0xa 0xa
In main 0x11f46148dc97db00 0 0 0x2b440346 0xa 0xa 0
hello world

# and if the first_reg array is switched

D_LIBRARY_PATH=/root/smoke-test/dynamic-static:/usr/lib64/dyninst DYNINSTAPI_RT_LIB=/usr/lib64/dyninst/libdyninstAPI_RT.so ./mutator-saveregs.x -dynamic hello.x 31 registers available: r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 arg[1]=reg[0] arg[2]=reg[1] arg[3]=reg[2] arg[4]=reg[3] arg[5]=reg[4] arg[6]=reg[5] arg[7]=reg[6] arg[1]=reg[7] arg[2]=reg[8] arg[3]=reg[9] arg[4]=reg[10] arg[5]=reg[11] arg[6]=reg[12] arg[7]=reg[13] arg[1]=reg[14] arg[2]=reg[15] arg[3]=reg[16] arg[4]=reg[17] arg[5]=reg[18] arg[6]=reg[19] arg[7]=reg[20] arg[1]=reg[21] arg[2]=reg[22] arg[3]=reg[23] arg[4]=reg[24] arg[5]=reg[25] arg[6]=reg[26] arg[7]=reg[27] mutator-saveregs.x: /builddir/build/BUILD/dyninst-10.1.0/dyninst-10.1.0/dyninstAPI/src/inst-aarch64.C:660: virtual Register EmitterAARCH64::emitCall(opCode, codeGen&, const std::vector<boost::shared_ptr<AstNode> >&, bool, func_instance*): Assertion `scratch != REG_NULL && "cannot get a scratch register"' failed.
In main 0xffff825b3e30 0x874 0xffff825d0c80 0x420018 0x100 0x400808 0
In main 0 0x6fb4cfb54261b600 0 0 0x3a60346 0xa 0xa
In main 0x6fb4cfb54261b600 0 0 0x3a60346 0xa 0xa 0
hello world
Aborted (core dumped)

[← Prev in Thread] Current Thread [Next in Thread→]