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

Unified Diff: third_party/WebKit/Source/wtf/Assertions.h

Issue 2240233002: Print additional message for RELEASE_ASSERT in builds used for fuzzing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: third_party/WebKit/Source/wtf/Assertions.h
diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h
index cab1dbc9709871de7d002f77f111a8cf81e46cd8..5b6f46e09cf749fa1e782c1cd0420ec6d03fe40a 100644
--- a/third_party/WebKit/Source/wtf/Assertions.h
+++ b/third_party/WebKit/Source/wtf/Assertions.h
@@ -289,11 +289,19 @@ private:
http://code.google.com/p/chromium/issues/entry?template=Security%20Bug
*/
// RELEASE_ASSERT is deprecated. We should use CHECK() instead.
+#if defined(ADDRESS_SANITIZER)
inferno 2016/08/12 17:43:56 This should come after #if ENABLE(ASSERT) block in
+#define RELEASE_ASSERT_FOR_FUZZING() do { \
+ WTFLogAlways("RELEASE_ASSERT failed.\n"); \
inferno 2016/08/12 17:43:56 We would need to get condition failed and stacktra
+ IMMEDIATE_CRASH(); \
+} while (0)
+#define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (RELEASE_ASSERT_FOR_FUZZING()) : (void)0)
+#else // defined(ADDRESS_SANITIZER)
#if ENABLE(ASSERT)
#define RELEASE_ASSERT(assertion) ASSERT(assertion)
#else
#define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH()) : (void)0)
#endif
+#endif // defined(ADDRESS_SANITIZER)
// TODO(tkent): Move this to base/logging.h?
#define RELEASE_NOTREACHED() LOG(FATAL)
« 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