7046732: JSR 292 assert(result == cpce->f1()) failed: expected result for assembly code

Wed, 25 May 2011 16:04:09 -0700

author
never
date
Wed, 25 May 2011 16:04:09 -0700
changeset 2934
7db2b9499c36
parent 2933
28a9fe9534ea
child 2935
c7c81f18c834

7046732: JSR 292 assert(result == cpce->f1()) failed: expected result for assembly code
Reviewed-by: kvn, iveresov, jrose

src/share/vm/interpreter/interpreterRuntime.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/interpreter/interpreterRuntime.cpp	Tue May 24 20:24:11 2011 -0700
     1.2 +++ b/src/share/vm/interpreter/interpreterRuntime.cpp	Wed May 25 16:04:09 2011 -0700
     1.3 @@ -139,9 +139,15 @@
     1.4    ResourceMark rm(thread);
     1.5    methodHandle m (thread, method(thread));
     1.6    Bytecode_loadconstant ldc(m, bci(thread));
     1.7 -  oop result = ldc.resolve_constant(THREAD);
     1.8 -  DEBUG_ONLY(ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc.cache_index()));
     1.9 -  assert(result == cpce->f1(), "expected result for assembly code");
    1.10 +  oop result = ldc.resolve_constant(CHECK);
    1.11 +#ifdef ASSERT
    1.12 +  {
    1.13 +    // The bytecode wrappers aren't GC-safe so construct a new one
    1.14 +    Bytecode_loadconstant ldc2(m, bci(thread));
    1.15 +    ConstantPoolCacheEntry* cpce = m->constants()->cache()->entry_at(ldc2.cache_index());
    1.16 +    assert(result == cpce->f1(), "expected result for assembly code");
    1.17 +  }
    1.18 +#endif
    1.19  }
    1.20  IRT_END
    1.21  

mercurial