[DynInst_API:] Broken exception handling in main()


Date: Mon, 24 Sep 2012 18:06:12 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: [DynInst_API:] Broken exception handling in main()
Hi,

I've been having an issue where Dyninst interferes with the mutatee's
exception handling, and I've managed to get it down to a simple test to
reproduce the issue.  Please see the attached tarball.

My test mutator is processMain, which just tries to start a process and
instrument the main function, adding a printf call to mark the occasion.
 The mutatee "throw" is just a main function that throws and catches its
own exception before returning.

When running by itself, the mutatee does just fine, exiting quietly.
When running instrumented, I get this:

  $ ./processMain ./throw
  main!
  terminate called after throwing an instance of 'std::runtime_error'
    what():  foo

So it does get the instrumentation's printf, but then the exception gets
thrown and not caught, forcing an bad exit and that terminate message
from libstdc++.

Any ideas?

Thanks,
Josh

Attachment: throw.tar.bz2
Description: application/bzip

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