Re: [DynInst_API:] Failed assertion in dyninst-10.0.0


Date: Wed, 12 Dec 2018 13:57:46 -0600
From: Xiaozhu Meng <mxz297@xxxxxxxxx>
Subject: Re: [DynInst_API:] Failed assertion in dyninst-10.0.0
Hi Yizi,

Thanks for your reproducer. However, I cannot reproduce your assertion failure. I downloaded your reproduce and run with the dyninst master branch. The head is the following commit:

commit da438121d0a4f33f47d48be72d047134ec158a4c
Merge: 20909b9 a24211d
Author: Xiaozhu Meng <mxz297@xxxxxxxxx>
Date:Â ÂFri Dec 7 17:18:19 2018 -0600

  Merge pull request #510 from dyninst/fix/whileExpr
 ÂÂ
  Fix whileExpr not generating the correct code and causing abort


Below are the results on my machine running your reproducer:

[xmeng@coriander] (47)$ ./inst_func test 1 2 3 4
open binary success
findpoint finished
POINT found, 1
printf() found!
[xmeng@coriander] (48)$ ls
Makefile inst_func* inst_func.cc inst_func.o rewritten* test* test_foo.c
[xmeng@coriander] (49)$ ./rewrittenÂ
procedure foo() called
22

Thanks,

--Xiaozhu

On Wed, Dec 12, 2018 at 12:32 PM Yizi Gu <yg31@xxxxxxxx> wrote:
Hi Xiaozhu,

Attached please find the mutated âtest_foo.câ and mutator âinst_func.ccâ . I also attach the makefile of inst_func.ccÂif it would help. Thanks!

Best regards,
YiziÂ

On Dec 12, 2018, at 12:24 PM, Xiaozhu Meng <mxz297@xxxxxxxxx> wrote:

Hi John,

A complete reproducer (including the mutator and the mutate) would be helpful. Please send it to me and I will take a look at it.

Thanks,

--Xiaozhu

On Wed, Dec 12, 2018 at 12:12 PM John Mellor-Crummey <johnmc@xxxxxxxx> wrote:
Ben,

We were seeing this problem on Âx86_64.Â

Yizi could provide a complete test program if that would be helpful. This week, Yizi wrote a simple test program that would instrument the entry to a single routine âfooâ in a simple program. The goal of this test program was to gain insight into the form and behavior of code generated by your new support in the emitter for marking frames to aid in call stack unwinding. To use this code, we tried the new Dyninst 10.0 release and the Dyninst master branch. We saw the same error with both.

We donât think believe this is a novice mistake as Yizi successfully used an earlier version of Dyninst to instrument loads and stores for data race detection.
--
John Mellor-Crummey Professor
Dept of Computer Science Rice University
email: johnmc@xxxxxxxx phone: 713-348-5179

On Dec 12, 2018, at 12:02 PM, Benjamin Welton <welton@xxxxxxxxxxx> wrote:

Hey John/Yizi,

What platform are you seeing this issue on?Â

Ben

From:ÂDyninst-api <dyninst-api-bounces@xxxxxxxxxxx> on behalf of John Mellor-Crummey <johnmc@xxxxxxxx>
Sent:ÂWednesday, December 12, 2018 11:48:18 AM
To:ÂYizi Gu
Cc:Âdyninst-api@xxxxxxxxxxx
Subject:ÂRe: [DynInst_API:] Failed assertion in dyninst-10.0.0
Â
The problem Yizi describes occurs when trying to generate code for a call to a Dyninst bookkeeping routine with a name that is approximately Dyninst_init_tramp_guard.
--
John Mellor-Crummey ÂProfessor
Dept of Computer Science ÂRice University
email: johnmc@xxxxxxxx phone:Â713-348-5179

On Dec 12, 2018, at 11:45 AM, Yizi Gu <yg31@xxxxxxxx> wrote:

Hi,

I encountered an assertion failure when trying to instrument a binary using dyninst-10.0.0. I installed Dyninst using spack. I am not sure if the assertion failure is triggered by client code or not.
The assertion failure is:ÂÂvirtual bool AstCallNode::initRegisters(codeGen&): Assertion `callee' failed.
May I get some help on this problem? Thanks!

Best regards,
YiziÂ

#0Â 0x00007f00f65bb1f7 in raise () from /lib64/libc.so.6
#1Â 0x00007f00f65bc8e8 in abort () from /lib64/libc.so.6
#2Â 0x00007f00f65b4266 in __assert_fail_base () from /lib64/libc.so.6
#3Â 0x00007f00f65b4312 in __assert_fail () from /lib64/libc.so.6
#4Â 0x00007f00f83e774d in AstCallNode::initRegisters (this=0x25c42e20, gen=...) at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/ast.C:2070
#5Â 0x00007f00f83e2ac8 in AstOperatorNode::initRegisters (this=0x25c42ea0, g=...) at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/ast.C:1142
#6Â 0x00007f00f8410109 in baseTramp::generateCodeInlined (this=0x25761f60, gen=...)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/baseTramp.C:355
#7Â 0x00007f00f840fa80 in baseTramp::generateCode (this=0x25761f60, gen=..., baseInMutatee=7340032)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/baseTramp.C:219
#8Â 0x00007f00f8521ceb in Dyninst::Relocation::InstWidgetPatch::apply (this=0x25d48ce0, gen=...)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/Relocation/Widgets/InstWidget.C:88
#9Â 0x00007f00f854e066 in Dyninst::Relocation::CodeBuffer::BufferElement::generate (this=0x25e1ae60, buf=0x25c30128, gen=..., shift=@0x25c302bc: 0, regenerate=@0x7fff447d177f: false)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/Relocation/CodeBuffer.C:117
#10 0x00007f00f854e9eb in Dyninst::Relocation::CodeBuffer::generate (this=0x25c30128, baseAddr=7340032)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/Relocation/CodeBuffer.C:274
#11 0x00007f00f8503c58 in Dyninst::Relocation::CodeMover::relocate (this=0x25c30080, addr=7340032)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/Relocation/CodeMover.C:179
#12 0x00007f00f84194c0 in AddressSpace::generateCode (this=0x1e67b10, cm=..., nearTo=4195258)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/addressSpace.C:1981
#13 0x00007f00f841841f in AddressSpace::relocateInt (this=0x1e67b10, begin=, end=, nearTo=4195258)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/addressSpace.C:1786
#14 0x00007f00f8417f9c in AddressSpace::relocate (this=0x1e67b10) at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/addressSpace.C:1739
#15 0x00007f00f8556144 in Dyninst::PatchAPI::DynInstrumenter::run (this=0x1e86f70)
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/Relocation/DynInstrumenter.C:54
#16 0x00007f00f5508206 in Dyninst::PatchAPI::Patcher::run (this=0x1e7f2d0) at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/patchAPI/src/Command.C:113
#17 0x00007f00f5507ed7 in Dyninst::PatchAPI::Command::commit (this=0x1e7f2d0) at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/patchAPI/src/Command.C:54
#18 0x00007f00f841b431 in AddressSpace::patch (as=0x1e67b10) at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/addressSpace.C:2333
#19 0x00007f00f83d4ad0 in BPatch_binaryEdit::writeFile (this=0x1e67a80, outFile=0x4059b7 "k_aux")
  at /home/yg31/spack/var/spack/stage/dyninst-develop-e37ilmcrv7gd6ykdobre5ijownoabgzp/dyninst/dyninstAPI/src/BPatch_binaryEdit.C:215
#20 0x0000000000403ed7 in finishInstrumenting (app=0x1e67a80, newName=0x4059b7 "k_aux") atÂinst_func.cc:93
#21 0x000000000040408d in __static_initialization_and_destruction_0 (__initialize_p=32767, __priority=1149060181) atÂinst_func.cc:123
#22 0x00007f00f65a7c05 in __libc_start_main () from /lib64/libc.so.6
#23 0x0000000000403919 in _start ()

_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
[← Prev in Thread] Current Thread [Next in Thread→]