Re: [DynInst_API:] Rewriter output file naming question


Date: Thu, 29 Nov 2012 18:19:38 -0800
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: Re: [DynInst_API:] Rewriter output file naming question
On 11/29/2012 05:40 PM, Andrew Bernat wrote:
> Where it gets nasty is in dependent libraries. For example, if you were
> rewriting foo with a library libbar.so in the same directory, modify
> both foo and libbar, and then write foo to foo.out, we will also write
> libbar.so - however, there is no interface to change the name of
> libbar.so and so the original is destroyed. Clearly this can't be a
> common operation, but it came up in testing. 
> 
> So we can certainly do it technically; the question is do we want to
> allow it. 

What does it mean to not allow it then -- now you can't make any
modifications in dependent libraries?  This sounds like a broader impact
than your initial question implied.

The documentation for writeFile() does go over the caveats of changes in
dependent libraries though, so it seems like this clobbering is already
expected behavior.

Regardless, a tmpfile-fsync-rename is still a good way to ensure
consistency in files you write.  Some future dyninst can add an
interface to rename those dependent libraries too, if desired.
[← Prev in Thread] Current Thread [Next in Thread→]