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

Side by Side 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: Move to #elif block (avoid changing debug builds) and use LOG_IF() instead of WTFLogAlways(). Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 #endif 256 #endif
257 257
258 // RELEASE_ASSERT 258 // RELEASE_ASSERT
259 // Use in places where failure of an assertion indicates a definite security 259 // Use in places where failure of an assertion indicates a definite security
260 // vulnerability from which execution must not continue even in a release build. 260 // vulnerability from which execution must not continue even in a release build.
261 // Please sure to file bugs for these failures using the security template: 261 // Please sure to file bugs for these failures using the security template:
262 // http://code.google.com/p/chromium/issues/entry?template=Security%20Bug 262 // http://code.google.com/p/chromium/issues/entry?template=Security%20Bug
263 // RELEASE_ASSERT is deprecated. We should use CHECK() instead. 263 // RELEASE_ASSERT is deprecated. We should use CHECK() instead.
264 #if ENABLE(ASSERT) 264 #if ENABLE(ASSERT)
265 #define RELEASE_ASSERT(assertion) ASSERT(assertion) 265 #define RELEASE_ASSERT(assertion) ASSERT(assertion)
266 #elif defined(ADDRESS_SANITIZER)
267 #define RELEASE_ASSERT(condition) LOG_IF(FATAL, !(condition)) << "Release assert failed: " #condition ". "
tkent 2016/08/25 12:54:06 We deprecated RELEASE_ASSERT(), and are replacing
mmoroz 2016/08/25 13:13:45 Good point! +1 to replace 'Release assert' -> 'Sec
mmoroz 2016/08/25 13:39:50 Hm, on ClusterFuzz side we mark 'Security CHECK fa
266 #else 268 #else
267 #define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH()) : (void)0) 269 #define RELEASE_ASSERT(assertion) (UNLIKELY(!(assertion)) ? (IMMEDIATE_CRASH()) : (void)0)
268 #endif 270 #endif
269 // TODO(tkent): Move this to base/logging.h? 271 // TODO(tkent): Move this to base/logging.h?
270 #define RELEASE_NOTREACHED() LOG(FATAL) 272 #define RELEASE_NOTREACHED() LOG(FATAL)
271 273
272 // DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES 274 // DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES
273 // Allow equality comparisons of Objects by reference or pointer, 275 // Allow equality comparisons of Objects by reference or pointer,
274 // interchangeably. This can be only used on types whose equality makes no 276 // interchangeably. This can be only used on types whose equality makes no
275 // other sense than pointer equality. 277 // other sense than pointer equality.
(...skipping 26 matching lines...) Expand all
302 } \ 304 } \
303 inline const thisType& to##thisType(const argumentType& argumentName) \ 305 inline const thisType& to##thisType(const argumentType& argumentName) \
304 { \ 306 { \
305 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \ 307 ASSERT_WITH_SECURITY_IMPLICATION(referencePredicate); \
306 return static_cast<const thisType&>(argumentName); \ 308 return static_cast<const thisType&>(argumentName); \
307 } \ 309 } \
308 void to##thisType(const thisType*); \ 310 void to##thisType(const thisType*); \
309 void to##thisType(const thisType&) 311 void to##thisType(const thisType&)
310 312
311 #endif // WTF_Assertions_h 313 #endif // WTF_Assertions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698