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

Side by Side Diff: Source/platform/heap/ThreadState.cpp

Issue 1110853002: Oilpan: In ASan, poison all unmarked objects before start sweeping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 { 887 {
888 TRACE_EVENT0("blink_gc", "ThreadState::invokePreFinalizers"); 888 TRACE_EVENT0("blink_gc", "ThreadState::invokePreFinalizers");
889 invokePreFinalizers(*Heap::s_markingVisitor); 889 invokePreFinalizers(*Heap::s_markingVisitor);
890 } 890 }
891 } 891 }
892 892
893 if (isMainThread()) 893 if (isMainThread())
894 ScriptForbiddenScope::exit(); 894 ScriptForbiddenScope::exit();
895 } 895 }
896 896
897 #if defined(ADDRESS_SANITIZER)
898 // TODO(haraken): Currently we cannot enable the poisoning because we have
899 // real bugs where destructors touch other on-heap objects. Remove all the bugs
900 // and enable the poisoning.
901 #if 0
902 for (int i = 0; i < NumberOfHeaps; i++)
903 m_heaps[i]->poisonUnmarkedObjects();
904 #endif
905 #endif
906
897 #if ENABLE(OILPAN) 907 #if ENABLE(OILPAN)
898 if (gcState() == EagerSweepScheduled) { 908 if (gcState() == EagerSweepScheduled) {
899 // Eager sweeping should happen only in testing. 909 // Eager sweeping should happen only in testing.
900 setGCState(Sweeping); 910 setGCState(Sweeping);
901 completeSweep(); 911 completeSweep();
902 } else { 912 } else {
903 // The default behavior is lazy sweeping. 913 // The default behavior is lazy sweeping.
904 setGCState(Sweeping); 914 setGCState(Sweeping);
905 scheduleIdleLazySweep(); 915 scheduleIdleLazySweep();
906 } 916 }
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 json->beginArray(it->key.ascii().data()); 1308 json->beginArray(it->key.ascii().data());
1299 for (size_t age = 0; age <= maxHeapObjectAge; ++age) 1309 for (size_t age = 0; age <= maxHeapObjectAge; ++age)
1300 json->pushInteger(it->value.ages[age]); 1310 json->pushInteger(it->value.ages[age]);
1301 json->endArray(); 1311 json->endArray();
1302 } 1312 }
1303 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release()); 1313 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID(TRACE_DISABLED_BY_DEFAULT("blink_gc"), s tatsName, this, json.release());
1304 } 1314 }
1305 #endif 1315 #endif
1306 1316
1307 } // namespace blink 1317 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698