Bug 1621323 - Disable an OOMing test for TSan and fix TSan OOM options. r=froydnj
authorChristian Holler <choller@mozilla.com>
Tue, 10 Mar 2020 16:22:25 +0000
changeset 517873 a7a6063bd5a4b49911b5a956c252a16961aec5a0
parent 517872 751127cc9b0e4f0d192113363ff7e237e00dd46b
child 517874 91c04bc7ec999933cecded74bf323f3a4e7d16c5
push id37202
push userccoroiu@mozilla.com
push dateTue, 10 Mar 2020 21:44:54 +0000
treeherdermozilla-central@a7a6063bd5a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1621323
milestone76.0a1
first release with
nightly linux32
a7a6063bd5a4 / 76.0a1 / 20200310214454 / files
nightly linux64
a7a6063bd5a4 / 76.0a1 / 20200310214454 / files
nightly mac
a7a6063bd5a4 / 76.0a1 / 20200310214454 / files
nightly win32
a7a6063bd5a4 / 76.0a1 / 20200310214454 / files
nightly win64
a7a6063bd5a4 / 76.0a1 / 20200310214454 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1621323 - Disable an OOMing test for TSan and fix TSan OOM options. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D66252
dom/base/test/mochitest.ini
mozglue/build/TsanOptions.cpp
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -784,16 +784,17 @@ skip-if = toolkit == 'android' # Plugins
 [test_postMessages_window.html]
 [test_postMessages_workers.html]
 [test_postMessages_broadcastChannel.html]
 [test_postMessages_messagePort.html]
 [test_postMessage_originAttributes.html]
 support-files = file_receiveMessage.html
 [test_processing_instruction_update_stylesheet.xhtml]
 [test_progress_events_for_gzip_data.html]
+skip-if = tsan # Bug 1621323
 [test_range_bounds.html]
 [test_reentrant_flush.html]
 [test_root_iframe.html]
 [test_screen_orientation.html]
 [test_script_loader_crossorigin_data_url.html]
 [test_script_loader_js_cache.html]
 skip-if = verify
 support-files =
--- a/mozglue/build/TsanOptions.cpp
+++ b/mozglue/build/TsanOptions.cpp
@@ -15,18 +15,24 @@
 // Currently, these are:
 //
 //   abort_on_error=1 - Causes TSan to abort instead of using exit().
 //   halt_on_error=1 - Causes TSan to stop on the first race detected.
 //
 //   report_signal_unsafe=0 - Required to avoid TSan deadlocks when
 //   receiving external signals (e.g. SIGINT manually on console).
 //
+//   allocator_may_return_null=1 - Tell TSan to return NULL when an allocation
+//   fails instead of aborting the program. This allows us to handle failing
+//   allocations the same way we would handle them with a regular allocator and
+//   also uncovers potential bugs that might occur in these situations.
+//
 extern "C" const char* __tsan_default_options() {
-  return "halt_on_error=1:abort_on_error=1:report_signal_unsafe=0";
+  return "halt_on_error=1:abort_on_error=1:report_signal_unsafe=0"
+         ":allocator_may_return_null=1";
 }
 
 //
 // When running with ThreadSanitizer, we sometimes need to suppress existing
 // races. However, in any case, it should be either because
 //
 //    1) a bug is on file. In this case, the bug number should always be
 //       included with the suppression.