Nikhil Reddy Kothapally via llvm-dev
2015-Sep-30 07:33 UTC
[llvm-dev] Fwd: Fwd: Regarding the Project details referred by Nanda Kishore
Dear Prof John Criswell, Thank you for you mail. The Changes i have done for SAFECode 3.2 V in Cygwin not for Linux after changing these files am able to get the Partial output in Cygwin. Yes Prof SAFECode on Windows is not reporting the errors as in Linux. For example, the getProgramCounter() function in safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp has #include guards that generate code that should work on Mac OS X and Linux. However, it will likely return a zero value on Windows as it does not have code to support Windows. You will need to look up how to get the program counter from a signal handler on Windows and use that to enhance the getProgramCounter() function so that it works on Windows ANS: I have already changed the getProgramCounter() function value in the Windows OS after that also am not able to make that to be Worked. I will be Working on SAFECode 3.2 V could you please kindly Help me out that how i can make this to be done that SAFECode 3.2 V should Work in Windows OS How to enhance this problem to Work in Windows OS? i was not able to do this prof please help me to find a solution for this. So am sharing the total Work Area of SAFECode 3.2 V Cygwin (Windows) please you can have a look in the files and find our solution Prof. Work.zip <https://drive.google.com/file/d/0BzRogh5FAOu9YnFqWmxjUUEtOEk/view?usp=drive_web> Thank You, Kind Regards, Nikhil Reddy Kothapally On Sat, Sep 26, 2015 at 9:40 PM, John Criswell <jtcriswel at gmail.com> wrote:> On 9/25/15 5:54 AM, Nikhil Reddy Kothapally wrote: > > Dear Prof John Criswell, > Here i will give you the brief > explanation what i have done till date > > Firstly i have used VMPlayer in my Windows latest and then i have > installed Debian Mint > > Then i have downloaded the SAFECode 3.2 V sources from the (*http://safecode.cs.illinois.edu/downloads.html > <http://safecode.cs.illinois.edu/downloads.html>*) and then i have > started the building the SAFECode compiler so i have made some changes in > the source files to compile those are > > > LLVM_SRC\projects\safecode\tools\LTO\Makefile > > > i have added to the code the library dependencies > > > $(PROJ_OBJ_ROOT)/$(BuildMode)/bin/cygLLVM-3.2svn.dll: > $(LLVM_OBJ_ROOT)/$(BuildMode)/bin/cygLLVM-3.2svn.dll > $(VERB) echo "Creating symlink to $@" > $(VERB) ln -fs $< $@ > > > > LLVM_SRC\projects\safecode\runtime\SoftBoundRuntime\softboundcets-wrappers.c > > > i have not used //#include <ttyent.h> > > > LLVM_SRC\projects\safecode\runtime\SoftBoundRuntime\softboundcets.h > > > i have used only #define _WEAK _INLINE > > > LLVM_SRC\projects\safecode\runtime\SoftBoundRuntime\softboundcets.c > > > i have not used the //#include <execinfo.h> > > > LLVM_SRC\projects\safecode\runtime\DebugRuntime\PoolAllocatorBitMask.cpp > > > i have included as APPLE instead of linux > > > > LLVM_SRC\projects\safecode\runtime\BBRuntime\BaggyBoundsCheck.cpp > > > i have included as APPLE instead of linux > > > Just to make sure I understand, did you make these changes to compile > SAFECode 3.2 on Linux or to compile it on Cygwin? You shouldn't have to > make changes to get it to compile on Linux. > > > > Now Then i have used the command sequences what i have sent you yesterday > and then i have got the compiler build and also used the Test code which is > present in (*http://safecode.cs.illinois.edu/docs/UsersGuide.html > <http://safecode.cs.illinois.edu/docs/UsersGuide.html> * sample debugging > code and then i have got the Error Report as it is in the page and i will > also give the screen short of that in the attachments and i will also send > you the command line which i have used to compile the test code > > > Now with this work done then i have installed the Cygwin Tool in my > Windows machine with the Required packages in it and then used the same > Sources the SAFECode 3.2 V which i have used to do in Debian with Changes > then i have got the Error Report but it is Partially done you can see in > the attachments. Since for this reason only i have asked for the Latest > Version of SAFECode which will have the ( SAFECode/tools/Clang is > integrated and included ) so i may be able to build the compiler Fully and > get the Full error report as it is generated in Debian. > > > If I understand correctly, the problem that you have is that SAFECode on > Windows is not reporting as many details about errors as SAFECode on > Linux. Is that correct? > > If so, then upgrading SAFECode to LLVM 3.7 will probably not help you. > SAFECode uses debugging metadata in programs to generate source file and > line information in its error reports. If you don't compile programs with > -g, then you won't get the source file and source line information. > > Additionally, some of the information in the SAFECode error reports are > determined in a platform-specific manner. Some of the information that you > see on Linux and Mac OS X will be missing in reports on Windows because the > SAFECode run-time library doesn't know how to find this information on > Windows. > > For example, the getProgramCounter() function in > safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp has #include guards > that generate code that should work on Mac OS X and Linux. However, it > will likely return a zero value on Windows as it does not have code to > support Windows. You will need to look up how to get the program counter > from a signal handler on Windows and use that to enhance the > getProgramCounter() function so that it works on Windows. > > You only need to upgrade to LLVM 3.7 *if* the program you want to compile > does not compile on Windows due to a bug in the original Clang compiler. > If the program compiles with Clang/LLVM 3.2, then SAFECode 3.2 will work > for you; you just need to enhance its error reporting facilities to work on > Windows. > > Regards, > > John Criswell > > -- > John Criswell > Assistant Professor > Department of Computer Science, University of Rochesterhttp://www.cs.rochester.edu/u/criswell > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150930/23dfe718/attachment.html>