Explorar el Código

Disable logs for fuzzer by default (#5938)

Co-authored-by: Kim Kulling <[email protected]>
tyler92 hace 8 meses
padre
commit
7bd54e3604
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      fuzz/assimp_fuzzer.cc

+ 4 - 0
fuzz/assimp_fuzzer.cc

@@ -47,8 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using namespace Assimp;
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataSize) {
+#ifdef _DEBUG
     aiLogStream stream = aiGetPredefinedLogStream(aiDefaultLogStream_STDOUT, nullptr);
     aiAttachLogStream(&stream);
+#endif
 
     Importer importer;
     const aiScene *sc = importer.ReadFileFromMemory(data, dataSize,
@@ -61,7 +63,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataSize) {
     Exporter exporter;
     exporter.ExportToBlob(sc, "fbx");
     
+#ifdef _DEBUG
     aiDetachLogStream(&stream);
+#endif
 
     return 0;
 }