8232921: assert(is_object_aligned(result)) failed: address not aligned
Reviewed-by: coleenp, rschmelter
This commit is contained in:
parent
f5632e62b2
commit
a3ee39cb81
@ -1962,6 +1962,8 @@ static inline bool version_matches(Method* method, int version) {
|
|||||||
// This class provides a simple wrapper over the internal structure of
|
// This class provides a simple wrapper over the internal structure of
|
||||||
// exception backtrace to insulate users of the backtrace from needing
|
// exception backtrace to insulate users of the backtrace from needing
|
||||||
// to know what it looks like.
|
// to know what it looks like.
|
||||||
|
// The code of this class is not GC safe. Allocations can only happen
|
||||||
|
// in expand().
|
||||||
class BacktraceBuilder: public StackObj {
|
class BacktraceBuilder: public StackObj {
|
||||||
friend class BacktraceIterator;
|
friend class BacktraceIterator;
|
||||||
private:
|
private:
|
||||||
@ -2110,10 +2112,14 @@ class BacktraceBuilder: public StackObj {
|
|||||||
|
|
||||||
void set_has_hidden_top_frame(TRAPS) {
|
void set_has_hidden_top_frame(TRAPS) {
|
||||||
if (_has_hidden_top_frame == NULL) {
|
if (_has_hidden_top_frame == NULL) {
|
||||||
jvalue prim;
|
// It would be nice to add java/lang/Boolean::TRUE here
|
||||||
prim.z = 1;
|
// to indicate that this backtrace has a hidden top frame.
|
||||||
PauseNoSafepointVerifier pnsv(&_nsv);
|
// But this code is used before TRUE is allocated.
|
||||||
_has_hidden_top_frame = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK);
|
// Therefor let's just use an arbitrary legal oop
|
||||||
|
// available right here. We only test for != null
|
||||||
|
// anyways. _methods is a short[].
|
||||||
|
assert(_methods != NULL, "we need a legal oop");
|
||||||
|
_has_hidden_top_frame = _methods;
|
||||||
_head->obj_at_put(trace_hidden_offset, _has_hidden_top_frame);
|
_head->obj_at_put(trace_hidden_offset, _has_hidden_top_frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user