WALA
WALA copied to clipboard
makeSymbol in CAstWrapper appears to be implemented incorrectly
In CAstWrapper.cpp, it appears that makeSymbol is not implemented correctly as it does not pass a CAstType to the constructor it calls.
e.g. Here a constructor is declared which takes a String and CAstType as parameters.
this->castSymbolInit1 =
env->GetMethodID(CAstSymbol, "<init>", "(Ljava/lang/String;Lcom/ibm/wala/cast/tree/CAstType;)V");
but later only a String is given to the constructor.
jobject CAstWrapper::makeSymbol(const char *name) {
jobject val = env->NewStringUTF( name );
jobject s = env->NewObject(CAstSymbol, castSymbolInit1, val); // <<<<<<<<<
THROW_ANY_EXCEPTION(java_ex);
LOG(s);
return s;
}
This applies to all variants of the makeSymbol call in CAstWrapper.cpp.
@juliandolby can you take a look?