Re: [DynInst_API:] Rewriter output file naming question


Date: Sat, 1 Dec 2012 20:46:40 -0600
From: Andrew Bernat <bernat@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] Rewriter output file naming question
On Nov 30, 2012, at 2:49 PM, Matthew LeGendre <legendre1@xxxxxxxx> wrote:

Allowing library renaming can get dangerous.  If you have a renamed libc-dyninst.so, then you're likely going to turn up loading both the original libc.so and libc-dyninst.so--and you don't want two libcs loaded at once (I've done that, it's bad).

Yes. So we're in a bad situation, really. We have options:

1) Modify without rename, either in-place for libs in the current directory or making a local copy. Can unexpectedly modify a local library and prevent future rewrites, or cause havoc if you have . in your LD_LIBRARY_PATH. 
2) Rename and end up with multiple inclusions, which will be broken. 
3) Force users to explicitly emit modified libraries, which is a pain. 
4) Move to a subdirectory (AKA package approach), which isn't obvious. 

I'd suggest leaving things mostly as-is.  Perhaps make overwriting of existing files an explicit error condition.  Right now you essentially have to manually put your rewritten files in a dedicated directory, which is slightly annoying, but unlike the alternatives it's not particularly dangerous.

Drew




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