diff options
48 files changed, 93 insertions, 62 deletions
diff --git a/build/art.go b/build/art.go index 9de2b05793..f52c63525a 100644 --- a/build/art.go +++ b/build/art.go @@ -87,7 +87,7 @@ func globalFlags(ctx android.BaseContext) ([]string, []string) { "-DART_STACK_OVERFLOW_GAP_arm64=8192", "-DART_STACK_OVERFLOW_GAP_mips=16384", "-DART_STACK_OVERFLOW_GAP_mips64=16384", - "-DART_STACK_OVERFLOW_GAP_x86=12288", + "-DART_STACK_OVERFLOW_GAP_x86=16384", "-DART_STACK_OVERFLOW_GAP_x86_64=20480") } else { cflags = append(cflags, diff --git a/compiler/dex/inline_method_analyser.cc b/compiler/dex/inline_method_analyser.cc index e691a67dc0..257229101c 100644 --- a/compiler/dex/inline_method_analyser.cc +++ b/compiler/dex/inline_method_analyser.cc @@ -433,8 +433,11 @@ bool InlineMethodAnalyser::AnalyseMethodCode(ArtMethod* method, InlineMethod* re // Native or abstract. return false; } - return AnalyseMethodCode( - code_item, method->ToMethodReference(), method->IsStatic(), method, result); + return AnalyseMethodCode(code_item, + MethodReference(method->GetDexFile(), method->GetDexMethodIndex()), + method->IsStatic(), + method, + result); } bool InlineMethodAnalyser::AnalyseMethodCode(const DexFile::CodeItem* code_item, diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 0097f55e53..93f678c64a 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2292,9 +2292,18 @@ class InitializeClassVisitor : public CompilationVisitor { ObjectLock<mirror::Class> lock(soa.Self(), h_klass); // Attempt to initialize allowing initialization of parent classes but still not static // fields. - bool is_superclass_initialized = InitializeDependencies(klass, class_loader, soa.Self()); - if (is_superclass_initialized) { + bool is_superclass_initialized = true; + if (!manager_->GetCompiler()->GetCompilerOptions().IsAppImage()) { + // If not an app image case, the compiler won't initialize too much things and do a fast + // fail, don't check dependencies. manager_->GetClassLinker()->EnsureInitialized(soa.Self(), klass, false, true); + } else { + // For app images, do the initialization recursively and resolve types encountered to make + // sure the compiler runs without error. + is_superclass_initialized = InitializeDependencies(klass, class_loader, soa.Self()); + if (is_superclass_initialized) { + manager_->GetClassLinker()->EnsureInitialized(soa.Self(), klass, false, true); + } } old_status = klass->GetStatus(); // If superclass cannot be initialized, no need to proceed. diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h index 8567c004fa..d1afcb8dd3 100644 --- a/runtime/art_method-inl.h +++ b/runtime/art_method-inl.h @@ -27,6 +27,7 @@ #include "dex_file_annotations.h" #include "dex_file-inl.h" #include "gc_root-inl.h" +#include "invoke_type.h" #include "jit/profiling_info.h" #include "mirror/class-inl.h" #include "mirror/dex_cache-inl.h" diff --git a/runtime/art_method.h b/runtime/art_method.h index 856bfd23e5..d8dfdd7959 100644 --- a/runtime/art_method.h +++ b/runtime/art_method.h @@ -24,19 +24,16 @@ #include "base/enums.h" #include "dex_file.h" #include "gc_root.h" -#include "invoke_type.h" -#include "method_reference.h" #include "modifiers.h" -#include "mirror/dex_cache.h" -#include "mirror/object.h" #include "obj_ptr.h" +#include "offsets.h" #include "read_barrier_option.h" -#include "utils.h" namespace art { template<class T> class Handle; class ImtConflictTable; +enum InvokeType : uint32_t; union JValue; class OatQuickMethodHeader; class ProfilingInfo; @@ -47,8 +44,13 @@ class ShadowFrame; namespace mirror { class Array; class Class; +class ClassLoader; +class DexCache; class IfTable; +class Object; +template <typename MirrorType> class ObjectArray; class PointerArray; +class String; } // namespace mirror class ArtMethod FINAL { @@ -318,11 +320,11 @@ class ArtMethod FINAL { } static MemberOffset DexMethodIndexOffset() { - return OFFSET_OF_OBJECT_MEMBER(ArtMethod, dex_method_index_); + return MemberOffset(OFFSETOF_MEMBER(ArtMethod, dex_method_index_)); } static MemberOffset MethodIndexOffset() { - return OFFSET_OF_OBJECT_MEMBER(ArtMethod, method_index_); + return MemberOffset(OFFSETOF_MEMBER(ArtMethod, method_index_)); } uint32_t GetCodeItemOffset() { @@ -524,10 +526,6 @@ class ArtMethod FINAL { bool IsImtUnimplementedMethod() REQUIRES_SHARED(Locks::mutator_lock_); - MethodReference ToMethodReference() REQUIRES_SHARED(Locks::mutator_lock_) { - return MethodReference(GetDexFile(), GetDexMethodIndex()); - } - // Find the catch block for the given exception type and dex_pc. When a catch block is found, // indicates whether the found catch block is responsible for clearing the exception or whether // a move-exception instruction is present. diff --git a/runtime/gc/accounting/bitmap.h b/runtime/gc/accounting/bitmap.h index eb004726df..d039d88770 100644 --- a/runtime/gc/accounting/bitmap.h +++ b/runtime/gc/accounting/bitmap.h @@ -25,7 +25,6 @@ #include "base/mutex.h" #include "globals.h" -#include "object_callbacks.h" namespace art { diff --git a/runtime/gc/accounting/heap_bitmap.h b/runtime/gc/accounting/heap_bitmap.h index 76247bce84..7097f87e91 100644 --- a/runtime/gc/accounting/heap_bitmap.h +++ b/runtime/gc/accounting/heap_bitmap.h @@ -19,7 +19,6 @@ #include "base/allocator.h" #include "base/logging.h" -#include "object_callbacks.h" #include "space_bitmap.h" namespace art { diff --git a/runtime/gc/accounting/remembered_set.h b/runtime/gc/accounting/remembered_set.h index 5594781672..c332f969ad 100644 --- a/runtime/gc/accounting/remembered_set.h +++ b/runtime/gc/accounting/remembered_set.h @@ -19,7 +19,6 @@ #include "base/allocator.h" #include "globals.h" -#include "object_callbacks.h" #include "safe_map.h" #include <set> diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h index b13648894d..889f57b333 100644 --- a/runtime/gc/accounting/space_bitmap.h +++ b/runtime/gc/accounting/space_bitmap.h @@ -25,7 +25,6 @@ #include "base/mutex.h" #include "globals.h" -#include "object_callbacks.h" namespace art { @@ -35,6 +34,9 @@ namespace mirror { } // namespace mirror class MemMap; +// Same as in object_callbacks.h. Just avoid the include. +typedef void (ObjectCallback)(mirror::Object* obj, void* arg); + namespace gc { namespace accounting { diff --git a/runtime/gc/allocation_listener.h b/runtime/gc/allocation_listener.h index d694a68b9c..21fa2142df 100644 --- a/runtime/gc/allocation_listener.h +++ b/runtime/gc/allocation_listener.h @@ -23,7 +23,6 @@ #include "base/macros.h" #include "base/mutex.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "gc_root.h" namespace art { diff --git a/runtime/gc/allocation_record.cc b/runtime/gc/allocation_record.cc index 122f7799df..2257b81e09 100644 --- a/runtime/gc/allocation_record.cc +++ b/runtime/gc/allocation_record.cc @@ -20,6 +20,7 @@ #include "base/enums.h" #include "base/stl_util.h" #include "obj_ptr-inl.h" +#include "object_callbacks.h" #include "stack.h" #ifdef ART_TARGET_ANDROID diff --git a/runtime/gc/allocation_record.h b/runtime/gc/allocation_record.h index 227c7ad28c..d31e442cc9 100644 --- a/runtime/gc/allocation_record.h +++ b/runtime/gc/allocation_record.h @@ -22,12 +22,12 @@ #include "base/mutex.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "gc_root.h" namespace art { class ArtMethod; +class IsMarkedVisitor; class Thread; namespace mirror { diff --git a/runtime/gc/collector/concurrent_copying.h b/runtime/gc/collector/concurrent_copying.h index f8ca8dba42..7b4340ee09 100644 --- a/runtime/gc/collector/concurrent_copying.h +++ b/runtime/gc/collector/concurrent_copying.h @@ -21,9 +21,7 @@ #include "garbage_collector.h" #include "immune_spaces.h" #include "jni.h" -#include "object_callbacks.h" #include "offsets.h" -#include "mirror/object.h" #include "mirror/object_reference.h" #include "safe_map.h" @@ -34,6 +32,10 @@ namespace art { class Closure; class RootInfo; +namespace mirror { +class Object; +} // namespace mirror + namespace gc { namespace accounting { diff --git a/runtime/gc/collector/mark_compact.h b/runtime/gc/collector/mark_compact.h index 85727c25c2..0bf4095ac3 100644 --- a/runtime/gc/collector/mark_compact.h +++ b/runtime/gc/collector/mark_compact.h @@ -28,7 +28,6 @@ #include "gc/accounting/heap_bitmap.h" #include "immune_spaces.h" #include "lock_word.h" -#include "object_callbacks.h" #include "offsets.h" namespace art { diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h index 5a9b9f8765..b9e06f9688 100644 --- a/runtime/gc/collector/mark_sweep.h +++ b/runtime/gc/collector/mark_sweep.h @@ -27,7 +27,6 @@ #include "gc_root.h" #include "gc/accounting/heap_bitmap.h" #include "immune_spaces.h" -#include "object_callbacks.h" #include "offsets.h" namespace art { diff --git a/runtime/gc/collector/semi_space.h b/runtime/gc/collector/semi_space.h index 9d6e74dde4..d3858baaf5 100644 --- a/runtime/gc/collector/semi_space.h +++ b/runtime/gc/collector/semi_space.h @@ -27,7 +27,6 @@ #include "gc/accounting/heap_bitmap.h" #include "immune_spaces.h" #include "mirror/object_reference.h" -#include "object_callbacks.h" #include "offsets.h" namespace art { diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index 24f4ce29e2..0289250966 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -34,7 +34,6 @@ #include "globals.h" #include "handle.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "offsets.h" #include "process_state.h" #include "safe_map.h" @@ -43,6 +42,7 @@ namespace art { class ConditionVariable; +class IsMarkedVisitor; class Mutex; class RootVisitor; class StackVisitor; @@ -51,6 +51,9 @@ class ThreadPool; class TimingLogger; class VariableSizedHandleScope; +// Same as in object_callbacks.h. Just avoid the include. +typedef void (ObjectCallback)(mirror::Object* obj, void* arg); + namespace mirror { class Class; class Object; diff --git a/runtime/gc/reference_processor.cc b/runtime/gc/reference_processor.cc index 886c950710..52da7632f0 100644 --- a/runtime/gc/reference_processor.cc +++ b/runtime/gc/reference_processor.cc @@ -22,6 +22,7 @@ #include "mirror/class-inl.h" #include "mirror/object-inl.h" #include "mirror/reference-inl.h" +#include "object_callbacks.h" #include "reference_processor-inl.h" #include "reflection.h" #include "ScopedLocalRef.h" diff --git a/runtime/gc/reference_processor.h b/runtime/gc/reference_processor.h index 38b68cbbe8..a8135d9a3b 100644 --- a/runtime/gc/reference_processor.h +++ b/runtime/gc/reference_processor.h @@ -20,11 +20,11 @@ #include "base/mutex.h" #include "globals.h" #include "jni.h" -#include "object_callbacks.h" #include "reference_queue.h" namespace art { +class IsMarkedVisitor; class TimingLogger; namespace mirror { diff --git a/runtime/gc/reference_queue.cc b/runtime/gc/reference_queue.cc index fd5dcf9de6..321d22a592 100644 --- a/runtime/gc/reference_queue.cc +++ b/runtime/gc/reference_queue.cc @@ -22,6 +22,7 @@ #include "mirror/class-inl.h" #include "mirror/object-inl.h" #include "mirror/reference-inl.h" +#include "object_callbacks.h" namespace art { namespace gc { diff --git a/runtime/gc/reference_queue.h b/runtime/gc/reference_queue.h index b73a880a8a..c48d48c530 100644 --- a/runtime/gc/reference_queue.h +++ b/runtime/gc/reference_queue.h @@ -27,7 +27,6 @@ #include "globals.h" #include "jni.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "offsets.h" #include "thread_pool.h" @@ -36,6 +35,9 @@ namespace mirror { class Reference; } // namespace mirror +class IsMarkedVisitor; +class MarkObjectVisitor; + namespace gc { namespace collector { diff --git a/runtime/gc/space/bump_pointer_space.h b/runtime/gc/space/bump_pointer_space.h index e9982e9d3c..566dc5dc40 100644 --- a/runtime/gc/space/bump_pointer_space.h +++ b/runtime/gc/space/bump_pointer_space.h @@ -17,10 +17,17 @@ #ifndef ART_RUNTIME_GC_SPACE_BUMP_POINTER_SPACE_H_ #define ART_RUNTIME_GC_SPACE_BUMP_POINTER_SPACE_H_ -#include "object_callbacks.h" #include "space.h" namespace art { + +namespace mirror { +class Object; +} + +// Same as in object_callbacks.h. Just avoid the include. +typedef void (ObjectCallback)(mirror::Object* obj, void* arg); + namespace gc { namespace collector { diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h index 79d620126c..6d52d959cb 100644 --- a/runtime/indirect_reference_table.h +++ b/runtime/indirect_reference_table.h @@ -28,7 +28,6 @@ #include "base/mutex.h" #include "gc_root.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "offsets.h" #include "read_barrier_option.h" diff --git a/runtime/intern_table.cc b/runtime/intern_table.cc index 3e1914604d..bfe4e1ccb7 100644 --- a/runtime/intern_table.cc +++ b/runtime/intern_table.cc @@ -27,6 +27,7 @@ #include "mirror/object_array-inl.h" #include "mirror/object-inl.h" #include "mirror/string-inl.h" +#include "object_callbacks.h" #include "thread.h" #include "utf.h" diff --git a/runtime/intern_table.h b/runtime/intern_table.h index 68454fbfd4..2ec03be670 100644 --- a/runtime/intern_table.h +++ b/runtime/intern_table.h @@ -25,10 +25,11 @@ #include "base/mutex.h" #include "gc_root.h" #include "gc/weak_root_state.h" -#include "object_callbacks.h" namespace art { +class IsMarkedVisitor; + namespace gc { namespace space { class ImageSpace; diff --git a/runtime/invoke_type.h b/runtime/invoke_type.h index de07c72ef0..a003f7fe9e 100644 --- a/runtime/invoke_type.h +++ b/runtime/invoke_type.h @@ -21,7 +21,7 @@ namespace art { -enum InvokeType { +enum InvokeType : uint32_t { kStatic, // <<static>> kDirect, // <<direct>> kVirtual, // <<virtual>> diff --git a/runtime/java_vm_ext.cc b/runtime/java_vm_ext.cc index 41376335a5..2ad3b29f17 100644 --- a/runtime/java_vm_ext.cc +++ b/runtime/java_vm_ext.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "jni_internal.h" +#include "java_vm_ext.h" #include <dlfcn.h> @@ -30,11 +30,12 @@ #include "fault_handler.h" #include "gc_root-inl.h" #include "indirect_reference_table-inl.h" +#include "jni_internal.h" #include "mirror/class-inl.h" #include "mirror/class_loader.h" #include "nativebridge/native_bridge.h" #include "nativeloader/native_loader.h" -#include "java_vm_ext.h" +#include "object_callbacks.h" #include "parsed_options.h" #include "runtime-inl.h" #include "runtime_options.h" diff --git a/runtime/java_vm_ext.h b/runtime/java_vm_ext.h index 7374920f2b..50aabdcdf5 100644 --- a/runtime/java_vm_ext.h +++ b/runtime/java_vm_ext.h @@ -32,6 +32,7 @@ namespace mirror { } // namespace mirror class ArtMethod; +class IsMarkedVisitor; class Libraries; class ParsedOptions; class Runtime; diff --git a/runtime/jit/jit.h b/runtime/jit/jit.h index 75f9b0ac76..f898d416c1 100644 --- a/runtime/jit/jit.h +++ b/runtime/jit/jit.h @@ -23,7 +23,6 @@ #include "base/timing_logger.h" #include "jit/profile_saver_options.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "profile_compilation_info.h" #include "thread_pool.h" diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc index 388a51751e..0cafac7380 100644 --- a/runtime/jit/jit_code_cache.cc +++ b/runtime/jit/jit_code_cache.cc @@ -35,6 +35,7 @@ #include "mem_map.h" #include "oat_file-inl.h" #include "oat_quick_method_header.h" +#include "object_callbacks.h" #include "scoped_thread_state_change-inl.h" #include "stack.h" #include "thread_list.h" diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h index eea2771500..9ecc876716 100644 --- a/runtime/jit/jit_code_cache.h +++ b/runtime/jit/jit_code_cache.h @@ -29,7 +29,6 @@ #include "jni.h" #include "method_reference.h" #include "oat_file.h" -#include "object_callbacks.h" #include "profile_compilation_info.h" #include "safe_map.h" #include "thread_pool.h" @@ -39,6 +38,7 @@ namespace art { class ArtMethod; class LinearAlloc; class InlineCache; +class IsMarkedVisitor; class OatQuickMethodHeader; class ProfilingInfo; diff --git a/runtime/jni_env_ext.h b/runtime/jni_env_ext.h index 60e4295e40..af933ae835 100644 --- a/runtime/jni_env_ext.h +++ b/runtime/jni_env_ext.h @@ -22,7 +22,6 @@ #include "base/macros.h" #include "base/mutex.h" #include "indirect_reference_table.h" -#include "object_callbacks.h" #include "obj_ptr.h" #include "reference_table.h" diff --git a/runtime/mirror/accessible_object.h b/runtime/mirror/accessible_object.h index 2581ac214f..a217193522 100644 --- a/runtime/mirror/accessible_object.h +++ b/runtime/mirror/accessible_object.h @@ -20,7 +20,6 @@ #include "class.h" #include "gc_root.h" #include "object.h" -#include "object_callbacks.h" #include "read_barrier_option.h" #include "thread.h" diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index 51d9d24619..7287a92fa5 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -22,7 +22,6 @@ #include "gc/allocator_type.h" #include "obj_ptr.h" #include "object.h" -#include "object_callbacks.h" namespace art { diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h index dfb2788c51..dfdd16240b 100644 --- a/runtime/mirror/class.h +++ b/runtime/mirror/class.h @@ -29,7 +29,6 @@ #include "modifiers.h" #include "object.h" #include "object_array.h" -#include "object_callbacks.h" #include "primitive.h" #include "read_barrier_option.h" #include "stride_iterator.h" diff --git a/runtime/mirror/class_ext.h b/runtime/mirror/class_ext.h index 708665d46b..75a3800989 100644 --- a/runtime/mirror/class_ext.h +++ b/runtime/mirror/class_ext.h @@ -23,7 +23,6 @@ #include "gc_root.h" #include "object.h" #include "object_array.h" -#include "object_callbacks.h" #include "string.h" namespace art { diff --git a/runtime/mirror/executable.h b/runtime/mirror/executable.h index 6c465f6bbb..8a28f66868 100644 --- a/runtime/mirror/executable.h +++ b/runtime/mirror/executable.h @@ -20,7 +20,6 @@ #include "accessible_object.h" #include "gc_root.h" #include "object.h" -#include "object_callbacks.h" #include "read_barrier_option.h" namespace art { diff --git a/runtime/mirror/field.h b/runtime/mirror/field.h index 222d709cef..40186a689b 100644 --- a/runtime/mirror/field.h +++ b/runtime/mirror/field.h @@ -22,7 +22,6 @@ #include "gc_root.h" #include "obj_ptr.h" #include "object.h" -#include "object_callbacks.h" #include "read_barrier_option.h" namespace art { diff --git a/runtime/mirror/stack_trace_element.h b/runtime/mirror/stack_trace_element.h index d32d8dca26..87e8a1f659 100644 --- a/runtime/mirror/stack_trace_element.h +++ b/runtime/mirror/stack_trace_element.h @@ -19,7 +19,6 @@ #include "gc_root.h" #include "object.h" -#include "object_callbacks.h" namespace art { diff --git a/runtime/mirror/string.h b/runtime/mirror/string.h index b59bbfbd68..7fbe8bd3a6 100644 --- a/runtime/mirror/string.h +++ b/runtime/mirror/string.h @@ -20,7 +20,6 @@ #include "gc_root.h" #include "gc/allocator_type.h" #include "object.h" -#include "object_callbacks.h" namespace art { diff --git a/runtime/mirror/throwable.cc b/runtime/mirror/throwable.cc index e50409f2c5..7027410ca6 100644 --- a/runtime/mirror/throwable.cc +++ b/runtime/mirror/throwable.cc @@ -26,7 +26,9 @@ #include "object-inl.h" #include "object_array.h" #include "object_array-inl.h" +#include "object_callbacks.h" #include "stack_trace_element.h" +#include "string.h" #include "utils.h" #include "well_known_classes.h" @@ -169,5 +171,17 @@ void Throwable::VisitRoots(RootVisitor* visitor) { java_lang_Throwable_.VisitRootIfNonNull(visitor, RootInfo(kRootStickyClass)); } +Object* Throwable::GetStackState() { + return GetFieldObjectVolatile<Object>(OFFSET_OF_OBJECT_MEMBER(Throwable, backtrace_)); +} + +Object* Throwable::GetStackTrace() { + return GetFieldObjectVolatile<Object>(OFFSET_OF_OBJECT_MEMBER(Throwable, backtrace_)); +} + +String* Throwable::GetDetailMessage() { + return GetFieldObject<String>(OFFSET_OF_OBJECT_MEMBER(Throwable, detail_message_)); +} + } // namespace mirror } // namespace art diff --git a/runtime/mirror/throwable.h b/runtime/mirror/throwable.h index 0a4ab6fe5c..fb45228f49 100644 --- a/runtime/mirror/throwable.h +++ b/runtime/mirror/throwable.h @@ -19,23 +19,22 @@ #include "gc_root.h" #include "object.h" -#include "object_callbacks.h" -#include "string.h" namespace art { +class RootVisitor; struct ThrowableOffsets; namespace mirror { +class String; + // C++ mirror of java.lang.Throwable class MANAGED Throwable : public Object { public: void SetDetailMessage(ObjPtr<String> new_detail_message) REQUIRES_SHARED(Locks::mutator_lock_); - String* GetDetailMessage() REQUIRES_SHARED(Locks::mutator_lock_) { - return GetFieldObject<String>(OFFSET_OF_OBJECT_MEMBER(Throwable, detail_message_)); - } + String* GetDetailMessage() REQUIRES_SHARED(Locks::mutator_lock_); std::string Dump() REQUIRES_SHARED(Locks::mutator_lock_); @@ -59,12 +58,8 @@ class MANAGED Throwable : public Object { REQUIRES_SHARED(Locks::mutator_lock_); private: - Object* GetStackState() REQUIRES_SHARED(Locks::mutator_lock_) { - return GetFieldObjectVolatile<Object>(OFFSET_OF_OBJECT_MEMBER(Throwable, backtrace_)); - } - Object* GetStackTrace() REQUIRES_SHARED(Locks::mutator_lock_) { - return GetFieldObjectVolatile<Object>(OFFSET_OF_OBJECT_MEMBER(Throwable, backtrace_)); - } + Object* GetStackState() REQUIRES_SHARED(Locks::mutator_lock_); + Object* GetStackTrace() REQUIRES_SHARED(Locks::mutator_lock_); // Field order required by test "ValidateFieldOrderOfJavaCppUnionClasses". HeapReference<Object> backtrace_; // Note this is Java volatile: diff --git a/runtime/monitor.cc b/runtime/monitor.cc index f94edcde94..a617818c3f 100644 --- a/runtime/monitor.cc +++ b/runtime/monitor.cc @@ -31,6 +31,7 @@ #include "lock_word-inl.h" #include "mirror/class-inl.h" #include "mirror/object-inl.h" +#include "object_callbacks.h" #include "scoped_thread_state_change-inl.h" #include "stack.h" #include "thread.h" diff --git a/runtime/monitor.h b/runtime/monitor.h index 6dc706f8b8..96c5a5b7cc 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -30,13 +30,13 @@ #include "base/mutex.h" #include "gc_root.h" #include "lock_word.h" -#include "object_callbacks.h" #include "read_barrier_option.h" #include "thread_state.h" namespace art { class ArtMethod; +class IsMarkedVisitor; class LockWord; template<class T> class Handle; class StackVisitor; diff --git a/runtime/reference_table.h b/runtime/reference_table.h index 8423e04e88..010c6f8fde 100644 --- a/runtime/reference_table.h +++ b/runtime/reference_table.h @@ -26,7 +26,6 @@ #include "base/mutex.h" #include "gc_root.h" #include "obj_ptr.h" -#include "object_callbacks.h" namespace art { namespace mirror { diff --git a/runtime/transaction.h b/runtime/transaction.h index 921de03754..747c2d0f38 100644 --- a/runtime/transaction.h +++ b/runtime/transaction.h @@ -22,7 +22,6 @@ #include "base/value_object.h" #include "dex_file_types.h" #include "gc_root.h" -#include "object_callbacks.h" #include "offsets.h" #include "primitive.h" #include "safe_map.h" diff --git a/runtime/verifier/reg_type.h b/runtime/verifier/reg_type.h index 25baac5094..6c01a7982a 100644 --- a/runtime/verifier/reg_type.h +++ b/runtime/verifier/reg_type.h @@ -30,7 +30,6 @@ #include "gc_root.h" #include "handle_scope.h" #include "obj_ptr.h" -#include "object_callbacks.h" #include "primitive.h" namespace art { diff --git a/test/knownfailures.json b/test/knownfailures.json index 4b16a5926d..214b827f6a 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -699,5 +699,12 @@ "of the framework. But a non-sanitized zipalign binary does not work with", "a sanitized libc++."], "env_vars": {"SANITIZE_HOST": "address"} + }, + { + "tests": "137-cfi", + "description": [ "ASan is reporting out-of-bounds reads in libunwind."], + "variant": "host", + "env_vars": {"SANITIZE_HOST": "address"}, + "bug": "b/62350406" } ] |