| 
Hi Alok, 
 
 Thanks for your reply. Well, I have given up on trying with ubuntu. I somehow managed to get it work on Fedora. So, it's fine for me right now.  And yes, about the createProcess and attachProcess APIs, I read the manual of DyninstAPI 5.2 in which it is written that these APIs are deprecated and should not be used. Instead, processCreate and processAttach should be used. 
 
 Anyways, thanks a lot for your help. If I face any other problems, I'll post it on mailing-list. 
 
 -Rishikesh On Tue, Mar 31, 2009 at 1:22 PM, alok singh  <alok_shishir@xxxxxxxxxxx> wrote:
 Sorry Rishikesh I am not sure what could be the cause of your problem. It looks like a problem with the installation. By the way, I looked at your program and saw that you used bpatch.processCreate() and bpatch.processAttach(). I remember being advised on this mailing list earlier to use bpatch.createProcess() and bpatch.attachProcess() instead. I just looked at one of my old dyninst programs and found this initialization: 
appProc = bpatch.createProcess("/home/alok/Documents/Dyninst/simple", NULL, NULL, 0, 1, 2);
 You can try making this change, although I doubt if it will solve the problem. If you want to test your installation with my small test programs, let me know.
 To: alok singh <alok_shishir@xxxxxxxxxxx> 
Cc: dyninst-api@xxxxxxxxxxx Sent: Sunday, 29 March, 2009 4:21:41 PM 
Subject: Re: [DynInst_API:] Stack protection error on ubuntu
 Hi Alok, 
 
 Thanks a lot for quick response!  
  Yes. I have exported all environment variables in bashrc file as said in README. 
 
 export DYNINST_ROOT=/home/dyninst/dyninstAPI/src 
export PLATFORM=i386-unknown-linux2.4 export LD_LIBRARY_PATH=/home/dyninst/dyninstAPI/src/i386-unknown-linux2.4/lib:/usr/local/lib/: export DYNINSTAPI_RT_LIB=${DYNINST_ROOT}/${PLATFORM}/lib/libdyninstAPI_RT.so.1 
 
 export DYNINST_CORE=${DYNINST_ROOT}/core export DYNINST_HEADERS=${DYNINST_ROOT}/include export DYNINST_LIBS=${DYNINST_ROOT}/${PLATFORM}/lib 
 
 I tried LD_PRELOAD as you suggested. But , it gives me errors  like :  
 
 rishi@box1:~$ ./exec 30688 Failed to find _dl_open process.C[2484]:  FIXME:  loadDYNINSTlib failed 
 
 rishi@box1:~$ export LD_PRELOAD=/home/dyninst/dyninstAPI/src/i386-unknown-linux2.4/lib/libdyninstAPI_RT.so.1 
rishi@box1:~$ ./exec 30688 ./exec: symbol lookup error: /home/dyninst/dyninstAPI/src/i386-unknown-linux2.4/lib/libdyninstAPI_RT.so.1: undefined symbol: __stack_chk_fail_local 
 
 
  
I am attaching the mutator program with this email.  Program fails in process attachment/ process creation part.  
 
 
 Thanks again. 
 
 Looking forward to your reply.. 
 
 -Rishikesh 
  On Sun, Mar 29, 2009 at 2:55 AM, alok singh  <alok_shishir@xxxxxxxxxxx> wrote:
 Have you exported the necessary environment variables for specifying the necessary libraries (like DYNINSTAPI_RT_LIB)? I haven't used Dyninst for a while so I don't remember the exact names of the variables but you can check the documentation/README for that. Since for you second problem it's complaining about the runtime library, you can try preloading the libdyninstAPI_RT.so by exporting LD_PRELOAD=/home/dyninst/dyninstAPI/src/i386-unknown-linux2.4/lib/libdyninstAPI_RT.so.1 and also exporting the path in LD_LIBRARY_PATH.  
Also I think it will be useful for people on mailing list if you could attach the program which is making calls to Dyninst functions.  
 
 Alok 
 From: Rishikesh Naik <rishinaik9@xxxxxxxxx> 
To: dyninst-api@xxxxxxxxxxx Sent: Sunday, 29 March, 2009 9:57:58 AM 
Subject: [DynInst_API:] Stack protection error on ubuntu
 Hi All, 
 
 I tried to create a simple mutator and mutatee programs. They compile fine. But, I am getting following error when I try to run it: 
 
 main: symbol lookup error: /home/dyninst/dyninstAPI/src/i386-unknown-linux2.4/lib/libdyninstAPI_RT.so.1: undefined symbol: __stack_chk_fail_local 
--SERIOUS-- #0: The process exited during startup.  This is likely due to one of two reasons: A). The application is mis-built and unable to load.  Try running the application outside of Dyninst and see if it loads properly. 
B). libdyninstAPI_RT is mis-built.  Try loadin --FATAL-- #68: Dyninst was unable to create the specified process --FATAL-- #68: create process failed bootstrap Segmentation fault 
  I am using ubuntu system. If found out that there was some issue with stack protection. I then recompiled the dyninst API with DISABLE-STACK-PROT=true in make.config.local file in src/core directory. I also disabled stack randomization.  
 
 But I am still having same issue. One more thing , I get this error only when I use createProcess function. When I try to attach to existing process I get following error: 
 
 process.C[2525]:  Don't have runtime library handle 
 
 
 I checked out the code at that line. it says to check if runtime library is loaded. But, I don't understand how to do that either. 
 
 So, can anybody help me with this? 
 
 I am stuck at this really badly. Any help is appreciated. 
 
 Thanks, Rishikesh 
 
 
 
 
 
 
 
  
  
      
  Get rid of Add-Ons in your email ID. Get  yourname@xxxxxxxxxxxxxx.  Sign up now! 
  
 
  
 |