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

Unified Diff: runtime/vm/object_test.cc

Issue 2711353003: Fixed tests not having MallocHooks initialized for tests in release mode. (Closed)
Patch Set: Created 3 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 | « runtime/vm/malloc_hooks_unsupported.cc ('k') | runtime/vm/os.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index c435602c24a15d7c8f053d718f1c4ef163dd04eb..fb4b621d61096674bfa36cd4d717a7a71813f2a5 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -10,6 +10,7 @@
#include "vm/dart_entry.h"
#include "vm/debugger.h"
#include "vm/isolate.h"
+#include "vm/malloc_hooks.h"
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/simulator.h"
@@ -2709,6 +2710,9 @@ ISOLATE_UNIT_TEST_CASE(Code) {
// Test for immutability of generated instructions. The test crashes with a
// segmentation fault when writing into it.
ISOLATE_UNIT_TEST_CASE(CodeImmutability) {
+ bool stack_trace_collection_enabled =
+ MallocHooks::stack_trace_collection_enabled();
+ MallocHooks::set_stack_trace_collection_enabled(false);
extern void GenerateIncrement(Assembler * assembler);
Assembler _assembler_;
GenerateIncrement(&_assembler_);
@@ -2726,6 +2730,8 @@ ISOLATE_UNIT_TEST_CASE(CodeImmutability) {
// TODO(regis, fschneider): Should this be FATAL() instead?
OS::DebugBreak();
}
+ MallocHooks::set_stack_trace_collection_enabled(
+ stack_trace_collection_enabled);
}
« no previous file with comments | « runtime/vm/malloc_hooks_unsupported.cc ('k') | runtime/vm/os.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698