Bugs in Da Vinci patches

Rémi Forax forax at univ-mlv.fr
Sat Mar 22 12:12:38 PDT 2008


Hi john, hi all,

When i tried to compile the VM patched on my laptop (fedora core 6),
the compiler find two problems:

a cut&paste problem in classFileParser.cpp:472
case T_DOUBLE: cp->long_at_put(index,  value.d); break;

should be:
case T_DOUBLE: cp->double_at_put(index,  value.d); break;
                                      ^^^^^

and in vm/oops/klass.cpp:492
assert(strlen(result) == result_len, "");
strcpy(result + result_len, hash_buf);
assert(strlen(result) == result_len + hash_len, "");

the two asserts compare signed and unsigned int,
so i've changed to:
assert((int)strlen(result) == result_len, "");
strcpy(result + result_len, hash_buf);
assert((int)strlen(result) == result_len + hash_len, "");

It seems to work but i don't develop in C since more than ten years  :) 

cheers,
Rémi




More information about the mlvm-dev mailing list