| 35 | } |
| 36 | |
| 37 | void LogFuzzStatus(const Status& st, const uint8_t* data, int64_t size) { |
| 38 | static const int kVerbosity = []() { |
| 39 | auto maybe_env_value = |
| 40 | GetEnvVarInteger("ARROW_FUZZING_VERBOSITY", /*min_value=*/0, /*max_value=*/1); |
| 41 | if (maybe_env_value.ok()) { |
| 42 | return static_cast<int>(*maybe_env_value); |
| 43 | } |
| 44 | if (!maybe_env_value.status().IsKeyError()) { |
| 45 | maybe_env_value.status().Abort(); |
| 46 | } |
| 47 | // Quiet by default |
| 48 | return 0; |
| 49 | }(); |
| 50 | |
| 51 | if (!st.ok() && kVerbosity >= 1) { |
| 52 | ARROW_LOG(WARNING) << "Fuzzing input with size=" << size |
| 53 | << " failed: " << st.ToString(); |
| 54 | } else if (st.IsOutOfMemory()) { |
| 55 | ARROW_LOG(WARNING) << "Fuzzing input with size=" << size |
| 56 | << " hit allocation failure: " << st.ToString(); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | } // namespace arrow::internal |
no test coverage detected