[vmkit-commits] [vmkit] r61805 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Jan 6 02:33:00 PST 2009


Author: geoffray
Date: Tue Jan  6 04:32:47 2009
New Revision: 61805

URL: http://llvm.org/viewvc/llvm-project?rev=61805&view=rev
Log:
Don't set a virtual table as constant: the runtime may decide to
modify it (eg tracer of classes like java.lang.Class).


Modified:
    vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp

Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=61805&r1=61804&r2=61805&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Tue Jan  6 04:32:47 2009
@@ -338,7 +338,9 @@
       const ArrayType* ATy = dyn_cast<ArrayType>(VTType->getContainedType(0));
       const PointerType* PTy = dyn_cast<PointerType>(ATy->getContainedType(0));
       ATy = ArrayType::get(PTy, classDef->virtualTableSize);
-      GlobalVariable* varGV = new GlobalVariable(ATy, true,
+      // Do not set a virtual table as a constant, because the runtime may
+      // modify it.
+      GlobalVariable* varGV = new GlobalVariable(ATy, false,
                                                  GlobalValue::ExternalLinkage,
                                                  0, "", this);
     





More information about the vmkit-commits mailing list