svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell AT illinois.edu>
- To: <Stefan.Scheruebl AT continental-corporation.com>, Csaba Raduly <rcsaba AT gmail.com>
- Cc: svadev AT cs.uiuc.edu
- Subject: Re: [svadev] SAFECode/PoolAllocator module is not compilable with Cygwin
- Date: Tue, 24 Jun 2014 09:59:30 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev/>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
On 6/24/14, 1:28 AM,
Stefan.Scheruebl AT continental-corporation.com
wrote:
Hello Csaba/John,
sorry for the late response but I always get interrupted in my projects...
On Mon, May 12, 2014 at 12:15 PM, wrote:CYGWIN_NT-6.1-WOW64 RBLPRR0G 1.7.29(0.272/5/3) 2014-04-07 13:44 i686 Cygwin
Hello,The output of "uname -a" is more important.
I've problems with the compilation of the SAFECode/PoolAllocator modules.
Preconditions:
Windows 7
Latest version of Cygwin (Setup-x86.exe version 2.850 (32 bit))
Was that the only error message? What is this definition in conflict with?After I followed the advice from John and disabled the compilation of the
runtime libraries the make of poolalloc works now.
The only left messages in the Safecode project are now:
...
make[2]: Entering directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/BitmapPoolAllocator'
/tmp/LLVM_SRC/Makefile.rules:1290: Bytecode libraries require LLVM capable
compiler but none is available ****
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/BitmapPoolAllocator'
make[2]: Entering directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime'
llvm[2]: Compiling PoolAllocatorBitMask.cpp for Release+Asserts build
/tmp/LLVM_SRC/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:62:22:
schwerwiegender Fehler: ucontext.h: No such file or directory
#include <ucontext.h>
You need to remove the use of this header file on Windows.
^
Kompilierung beendet.
/usr/bin/rm: Entfernen von
„/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime/Release+Asserts/PoolAllocatorBitMask.d.tmp“
nicht möglich: No such file or directory
make[2]: ***
[/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime/Release+Asserts/PoolAllocatorBitMask.o]
Error 1
make[2]: Leaving directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime'
make[1]: *** [DebugRuntime/.makeall] Error 2
make[1]: Leaving directory `/tmp/LLVM_OBJ/projects/safecode/runtime'
make: *** [all] Error 1
...
When I patch the function getProgramCounter to return 0 only (getProgramCounter (void * context){return 0;}) then I get the following stuff:
make[2]: Entering directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/BitmapPoolAllocator'
/tmp/LLVM_SRC/Makefile.rules:1290: Bytecode libraries require LLVM capable
compiler but none is available ****
This is a warning and should be fine.
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/BitmapPoolAllocator'
make[2]: Entering directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime'
llvm[2]: Compiling PoolAllocatorBitMask.cpp for Release+Asserts build
/tmp/LLVM_SRC/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:
In function »void pool_init_runtime(unsigned int, unsigned int, unsigned
int)«:
/tmp/LLVM_SRC/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:179:31:
Error: »MADV_FREE« not defined in this scope
madvise (Addr, invalidsize, MADV_FREE);
MADV_FREE tells the OS kernel that the pages can be reused right away; it basically informs the OS that there is no real need to keep physical memory mapped in this address range.
Not all operating systems have this. You should comment out the line or (better yet) change the #ifdef guard to check for #if defined(__APPLE__) instead of #if !defined(__linux__).
^
/tmp/LLVM_SRC/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:
In function »void updateMDOnFree(llvm::DebugPoolTy*, void*, llvm::allocType,
unsigned int, const char*, unsigned int)«:
/tmp/LLVM_SRC/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1176:30:
Warning: Conversion of the type »const char*« in Typ »void*« removes
qualifier [-Wcast-qual]
(void *)SourceFilep,
^
/usr/bin/rm: Removement of
„/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime/Release+Asserts/PoolAllocatorBitMask.d.tmp“
not possible: No such file or directory
make[2]: ***
[/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime/Release+Asserts/PoolAllocatorBitMask.o]
Error 1
make[2]: Leaving directory
`/tmp/LLVM_OBJ/projects/safecode/runtime/DebugRuntime'
make[1]: *** [DebugRuntime/.makeall] Error 2
make[1]: Leaving directory `/tmp/LLVM_OBJ/projects/safecode/runtime'
make: *** [all] Error 1
Why is it here a problem to remove a file that does not exist? And what is
the issue with this MADV_FREE define?
I'm not sure why the rm is failing; I suspect it's because the compile is failing and so the file that rm wants to remove is not there. Hopefully fixing the compile will fix the rm issue.
Just out of curiosity, why do you need SAFECode to work on Windows?In my company the whole tools chain is built on windows and so also my
solution has to be solved on it.
Is the software that you're going to instrument with SAFECode using Windows-specific API's (e.g., HeapAlloc)? If so, then SAFECode may not catch as many errors as it does on Unix systems. This is because it won't recognize memory allocated by Windows-specific API functions. Enhancing SAFECode to handle those should be pretty easy to do.
Also, I should point out that SAFECode can catch more errors when you use the libLTO functionality. I have no idea if that works on Windows Cygwin, but once you get basic SAFECode working, it may be worth your while to try the libLTO functionality.
Regards,
John Criswell
Regards,
Stefan
- Re: [svadev] SAFECode/PoolAllocator module is not compilable with Cygwin, Stefan . Scheruebl, 06/24/2014
- Re: [svadev] SAFECode/PoolAllocator module is not compilable with Cygwin, John Criswell, 06/24/2014
- [svadev] Make of SAFECode module fails with Cygwin.., Stefan . Scheruebl, 06/25/2014
- [svadev] make in dir LLVM_OBJ/projects/safecode/tools/LTO fails, Stefan . Scheruebl, 06/25/2014
- Re: [svadev] make in dir LLVM_OBJ/projects/safecode/tools/LTO fails, John Criswell, 06/25/2014
Archive powered by MHonArc 2.6.16.