[klee] r146350 - in /klee/trunk/runtime/Intrinsic: Makefile memset.c
Cristian Cadar
cristic at cs.stanford.edu
Sun Dec 11 13:29:53 PST 2011
Author: cristic
Date: Sun Dec 11 15:29:52 2011
New Revision: 146350
URL: http://llvm.org/viewvc/llvm-project?rev=146350&view=rev
Log:
This is a workaround for the infinite loop reported at
http://keeda.stanford.edu/pipermail/klee-dev/2011-August/000723.html
KLEE needs to use --fno-builtin when compiling its version of memset.
However, this patch also adds the workaround suggested by Paul in the
thread above, since support for --fno-builtin was added to llvm-gcc only
after LLVM 2.9 was released.
More details about this issue can be found here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110411/119376.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20110711/124131.html
Thanks to Paul and arrowdodger for their explanations and patches.
Modified:
klee/trunk/runtime/Intrinsic/Makefile
klee/trunk/runtime/Intrinsic/memset.c
Modified: klee/trunk/runtime/Intrinsic/Makefile
URL: http://llvm.org/viewvc/llvm-project/klee/trunk/runtime/Intrinsic/Makefile?rev=146350&r1=146349&r2=146350&view=diff
==============================================================================
--- klee/trunk/runtime/Intrinsic/Makefile (original)
+++ klee/trunk/runtime/Intrinsic/Makefile Sun Dec 11 15:29:52 2011
@@ -17,4 +17,6 @@
DEBUG_RUNTIME=1
NO_PEDANTIC=1
+C.Flags += -fno-builtin
+
include $(LEVEL)/Makefile.common
Modified: klee/trunk/runtime/Intrinsic/memset.c
URL: http://llvm.org/viewvc/llvm-project/klee/trunk/runtime/Intrinsic/memset.c?rev=146350&r1=146349&r2=146350&view=diff
==============================================================================
--- klee/trunk/runtime/Intrinsic/memset.c (original)
+++ klee/trunk/runtime/Intrinsic/memset.c Sun Dec 11 15:29:52 2011
@@ -10,7 +10,7 @@
#include <stdlib.h>
void *memset(void * dst, int s, size_t count) {
- char * a = dst;
+ volatile char * a = dst;
while (count-- > 0)
*a++ = s;
return dst;
More information about the klee-commits
mailing list