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

Unified Diff: test/cctest/test-log.cc

Issue 1396843004: improve perf_basic_prof filename reporting (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: shorten url in comment Created 5 years, 2 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 | « src/log.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index 9ca2f839631fe1c3a5b4fcb7f0df0693f5f306e9..e45bc7e22e0f1cfe0d1ac4ce0e3b4e478cc2f402 100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -531,3 +531,50 @@ TEST(LogVersion) {
}
isolate->Dispose();
}
+
+
+// https://crbug.com/539892
+// CodeCreateEvents with really large names should not crash.
+TEST(Issue539892) {
+ SETUP_FLAGS();
+ bool saved_perf_basic_prof = i::FLAG_perf_basic_prof;
+ i::FLAG_perf_basic_prof = true;
+
+ v8::Isolate::CreateParams create_params;
+ create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+ v8::Isolate* isolate = v8::Isolate::New(create_params);
+
+ {
+ ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
+ Logger* logger = initialize_logger.logger();
+
+ // Function with a really large name.
+ const char* source_text =
+ "(function "
+ "baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"
+ "(){})();";
+
+ CompileRun(source_text);
+
+ // Must not crash.
+ logger->LogCompiledFunctions();
+ }
+ isolate->Dispose();
+ i::FLAG_perf_basic_prof = saved_perf_basic_prof;
+}
« no previous file with comments | « src/log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698