Also check asserts in fuzzing

This commit is contained in:
Martijn van Beurden 2022-08-13 20:24:26 +02:00
parent 0ab961de52
commit a73e70c8f4
1 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,10 @@
#define FLAC__ASSERT_H
/* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
#define FLAC__ASSERT(x) if(!(x)) __builtin_abort();
#define FLAC__ASSERT_DECLARATION(x) x
#else
#ifndef NDEBUG
#include <assert.h>
#define FLAC__ASSERT(x) assert(x)
@ -42,5 +46,6 @@
#define FLAC__ASSERT(x)
#define FLAC__ASSERT_DECLARATION(x)
#endif
#endif
#endif