Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Unified Diff: runtime/vm/profiler.cc

Issue 915723002: Make ASAN/MSAN ignore Dart frames. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
===================================================================
--- runtime/vm/profiler.cc (revision 43648)
+++ runtime/vm/profiler.cc (working copy)
@@ -408,22 +408,37 @@
uword InitialReturnAddress() const {
ASSERT(sp_ != NULL);
+ // MSan/ASan are unaware of frames initialized by generated code.
+ MSAN_UNPOISON(sp_, kWordSize);
+ ASAN_UNPOISON(sp_, kWordSize);
return *(sp_);
}
uword* CallerPC() const {
ASSERT(fp_ != NULL);
- return reinterpret_cast<uword*>(*(fp_ + kSavedCallerPcSlotFromFp));
+ uword* caller_pc_ptr = fp_ + kSavedCallerPcSlotFromFp;
+ // MSan/ASan are unaware of frames initialized by generated code.
+ MSAN_UNPOISON(caller_pc_ptr, kWordSize);
+ ASAN_UNPOISON(caller_pc_ptr, kWordSize);
+ return reinterpret_cast<uword*>(*caller_pc_ptr);
}
uword* CallerFP() const {
ASSERT(fp_ != NULL);
- return reinterpret_cast<uword*>(*(fp_ + kSavedCallerFpSlotFromFp));
+ uword* caller_fp_ptr = fp_ + kSavedCallerFpSlotFromFp;
+ // MSan/ASan are unaware of frames initialized by generated code.
+ MSAN_UNPOISON(caller_fp_ptr, kWordSize);
+ ASAN_UNPOISON(caller_fp_ptr, kWordSize);
+ return reinterpret_cast<uword*>(*caller_fp_ptr);
}
uword* ExitLink() const {
ASSERT(fp_ != NULL);
- return reinterpret_cast<uword*>(*(fp_ + kExitLinkSlotFromEntryFp));
+ uword* exit_link_ptr = fp_ + kExitLinkSlotFromEntryFp;
+ // MSan/ASan are unaware of frames initialized by generated code.
+ MSAN_UNPOISON(exit_link_ptr, kWordSize);
+ ASAN_UNPOISON(exit_link_ptr, kWordSize);
+ return reinterpret_cast<uword*>(*exit_link_ptr);
}
bool ValidFramePointer() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698