mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 02:15:43 +00:00
fuzzing: When fuzzing, always ASSERT, and abort() instead of SIGTRAP
Currently, when we hit an assertion failure, the fuzzer stops immediately without producing a crash. This patch makes it so that we do a hard abort instead which will be caught. Bug: dawn:295, dawn:293 Fixes: dawn:293 Change-Id: Ie00074e84b51c9aa364aba96c11a35659bbba740 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14682 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
cf788596f4
commit
5217ad51c5
@@ -15,11 +15,17 @@
|
||||
#include "common/Assert.h"
|
||||
#include "common/Log.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
void HandleAssertionFailure(const char* file,
|
||||
const char* function,
|
||||
int line,
|
||||
const char* condition) {
|
||||
dawn::ErrorLog() << "Assertion failure at " << file << ":" << line << " (" << function
|
||||
<< "): " << condition;
|
||||
#if defined(DAWN_ABORT_ON_ASSERT)
|
||||
abort();
|
||||
#else
|
||||
DAWN_BREAKPOINT();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user