| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/memory_sanitizer.h" |
| 5 #include "platform/utils.h" | 6 #include "platform/utils.h" |
| 6 | 7 |
| 7 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 8 #include "vm/atomic.h" | 9 #include "vm/atomic.h" |
| 9 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| 10 #include "vm/isolate.h" | 11 #include "vm/isolate.h" |
| 11 #include "vm/json_stream.h" | 12 #include "vm/json_stream.h" |
| 12 #include "vm/lockers.h" | 13 #include "vm/lockers.h" |
| 13 #include "vm/native_symbol.h" | 14 #include "vm/native_symbol.h" |
| 14 #include "vm/object.h" | 15 #include "vm/object.h" |
| (...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1927 } | 1928 } |
| 1928 | 1929 |
| 1929 private: | 1930 private: |
| 1930 uword* CallerPC(uword* fp) const { | 1931 uword* CallerPC(uword* fp) const { |
| 1931 ASSERT(fp != NULL); | 1932 ASSERT(fp != NULL); |
| 1932 return reinterpret_cast<uword*>(*(fp + kSavedCallerPcSlotFromFp)); | 1933 return reinterpret_cast<uword*>(*(fp + kSavedCallerPcSlotFromFp)); |
| 1933 } | 1934 } |
| 1934 | 1935 |
| 1935 uword* CallerFP(uword* fp) const { | 1936 uword* CallerFP(uword* fp) const { |
| 1936 ASSERT(fp != NULL); | 1937 ASSERT(fp != NULL); |
| 1937 return reinterpret_cast<uword*>(*(fp + kSavedCallerFpSlotFromFp)); | 1938 uword* caller_fp_ptr = fp + kSavedCallerFpSlotFromFp; |
| 1939 // This may actually be uninitialized, by design (see class comment above). |
| 1940 __msan_unpoison(caller_fp_ptr, kWordSize); |
| 1941 return reinterpret_cast<uword*>(*caller_fp_ptr); |
| 1938 } | 1942 } |
| 1939 | 1943 |
| 1940 bool ValidFramePointer(uword* fp) const { | 1944 bool ValidFramePointer(uword* fp) const { |
| 1941 if (fp == NULL) { | 1945 if (fp == NULL) { |
| 1942 return false; | 1946 return false; |
| 1943 } | 1947 } |
| 1944 uword cursor = reinterpret_cast<uword>(fp); | 1948 uword cursor = reinterpret_cast<uword>(fp); |
| 1945 cursor += sizeof(fp); | 1949 cursor += sizeof(fp); |
| 1946 bool r = (cursor >= lower_bound_) && (cursor < stack_upper_); | 1950 bool r = (cursor >= lower_bound_) && (cursor < stack_upper_); |
| 1947 return r; | 1951 return r; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 state.pc, | 2114 state.pc, |
| 2111 state.fp, | 2115 state.fp, |
| 2112 sp); | 2116 sp); |
| 2113 stackWalker.walk(); | 2117 stackWalker.walk(); |
| 2114 #endif | 2118 #endif |
| 2115 } | 2119 } |
| 2116 } | 2120 } |
| 2117 } | 2121 } |
| 2118 | 2122 |
| 2119 } // namespace dart | 2123 } // namespace dart |
| OLD | NEW |