Skip to content
Permalink
Browse files

8234173: assert(loader != __null && oopDesc::is_oop(loader)) failed: …

…loader must be oop

Reviewed-by: kbarrett, egahlin, tschatzl
  • Loading branch information
Sangheon Kim
Sangheon Kim committed Jan 16, 2020
1 parent 85255c5 commit c26aa638a162150c5ea19aae6920feae4f9b0896
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -131,7 +131,7 @@ void BFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
if (!_mark_bits->is_marked(pointee)) {
_mark_bits->mark_obj(pointee);
// is the pointee a sample object?
if (NULL == pointee->mark().to_pointer()) {
if (pointee->mark().is_marked()) {
add_chain(reference, pointee);
}

@@ -148,7 +148,7 @@ void BFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {

void BFSClosure::add_chain(UnifiedOopRef reference, const oop pointee) {
assert(pointee != NULL, "invariant");
assert(NULL == pointee->mark().to_pointer(), "invariant");
assert(pointee->mark().is_marked(), "invariant");
Edge leak_edge(_current_parent, reference);
_edge_store->put_chain(&leak_edge, _current_parent == NULL ? 1 : _current_frontier_level + 2);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -121,7 +121,7 @@ void DFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
assert(_mark_bits->is_marked(pointee), "invariant");

// is the pointee a sample object?
if (NULL == pointee->mark().to_pointer()) {
if (pointee->mark().is_marked()) {
add_chain();
}

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -231,7 +231,7 @@ StoredEdge* EdgeStore::associate_leak_context_with_candidate(const Edge* edge) {
StoredEdge* const leak_context_edge = put(edge->reference());
oop sample_object = edge->pointee();
assert(sample_object != NULL, "invariant");
assert(NULL == sample_object->mark().to_pointer(), "invariant");
assert(sample_object->mark().is_marked(), "invariant");
sample_object->set_mark(markWord::from_pointer(leak_context_edge));
return leak_context_edge;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,14 +67,11 @@ class ObjectSampleMarker : public StackObj {
assert(obj != NULL, "invariant");
// save the original markWord
_store->push(ObjectSampleMarkWord(obj, obj->mark()));
// now we will "poison" the mark word of the sample object
// to the intermediate monitor INFLATING state.
// This is an "impossible" state during a safepoint,
// hence we will use it to quickly identify sample objects
// during the reachability search from gc roots.
assert(NULL == markWord::INFLATING().to_pointer(), "invariant");
obj->set_mark(markWord::INFLATING());
assert(NULL == obj->mark().to_pointer(), "invariant");
// now we will set the mark word to "marked" in order to quickly
// identify sample objects during the reachability search from gc roots.
assert(!obj->mark().is_marked(), "should only mark an object once");
obj->set_mark(markWord::prototype().set_marked());
assert(obj->mark().is_marked(), "invariant");
}
};

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,9 @@ void EventEmitter::write_event(const ObjectSample* sample, EdgeStore* edge_store
traceid gc_root_id = 0;
const Edge* edge = NULL;
if (SafepointSynchronize::is_at_safepoint()) {
edge = (const Edge*)(sample->object())->mark().to_pointer();
if (!sample->object()->mark().is_marked()) {
edge = (const Edge*)(sample->object())->mark().to_pointer();
}
}
if (edge == NULL) {
// In order to dump out a representation of the event
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -83,8 +83,7 @@
// [ptr | 00] locked ptr points to real header on stack
// [header | 0 | 01] unlocked regular object header
// [ptr | 10] monitor inflated lock (header is wapped out)
// [ptr | 11] marked used by markSweep to mark an object
// not valid at any other time
// [ptr | 11] marked used to mark an object
//
// We assume that stack/thread pointers have the lowest two bits cleared.

0 comments on commit c26aa63

Please sign in to comment.