The AST fuzzer was reporting false failures when the server hit its
memory limit. `MEMORY_LIMIT_EXCEEDED` means the server correctly
rejected an expensive fuzzed query, not that it died.
Two fixes:
- In `FuzzLoop.cpp`, treat `MEMORY_LIMIT_EXCEEDED` like
`TOO_DEEP_RECURSION`: clear the error and continue fuzzing instead of
attempting reconnection, failing, and exiting with code 241.
- In `run-fuzzer.sh`, treat `MEMORY_LIMIT_EXCEEDED` during the
post-fuzzing liveness check as a transient condition (like
`TOO_MANY_SIMULTANEOUS_QUERIES`) instead of declaring the server dead.
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=102000&sha=latest&name_0=PR&name_1=AST+fuzzer+%28arm_asan_ubsan%29
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Resolve merge conflicts:
- `base/base/coverage.cpp`: take master's version which removed the old
sanitizer coverage guard/trace functions (replaced by LLVM profile-based
coverage)
- `src/Client/BuzzHouse/AST/SQLProtoStr.cpp`: take master's unified
`CONV_FN(SQLIdentifier, ident)` replacing the individual per-type
converter functions
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix `io_destroy` prototype mismatch in `AIO.h` for FreeBSD (declared as
`int io_destroy(void)` but defined as `int io_destroy(int ctx)`)
- Add forward declarations for `LLVMFuzzerInitialize` and
`LLVMFuzzerTestOneInput` in fuzzer files, and make file-local helper
functions `static` to fix `-Wmissing-prototypes` in arm_fuzzers build
- Add `extern "C"` forward declaration for `reallocarray` in `malloc.cpp`
to fix `-Wmissing-prototypes` in ppc64le build
- Suppress `-Wdisabled-macro-expansion` in `FuzzLoop.cpp` because musl
defines `stderr` as `(stderr)` which is a recursive macro
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Remove `CurrentThread.h` from high-fan-out headers: `ProcessList.h`,
`IQueryPlanStep.h`, `DDLWorker.h`, `TCPHandler.h`, `AggregatingTransform.h`,
`ParallelParsingInputFormat.h`, `StorageTableFunction.h`, `parseSyslogLevel.h`,
`EmbeddedRocksDBBulkSink.h`, `BlockIO.h`, `LocalConnection.h`,
`StorageMaterializedView.h`, `HTTPHandler.h`
- Extract `QueryScope` from `CurrentThread` into standalone `Common/QueryScope.h`
with its own `.cpp`, replacing the nested `CurrentThread::QueryScope` class
- Extract `getCurrentThreadGroup` free function into `Common/ThreadGroupSwitcher.h`,
replacing `CurrentThread::getGroup()` in template headers:
`threadPoolCallbackRunner.h`, `ParallelFormattingOutputFormat.h`,
`HashedDictionaryParallelLoader.h`, `UniqExactSet.h`, `HashedDictionary.h`,
`StatusRequestsPool.h`
- De-inline `MemoryTrackerSwitcher` ctor/dtor into `MemoryTrackerSwitcher.cpp`
- De-inline `ResourceGuard::Request::wait` into `ResourceGuard.cpp`
- De-inline `ManyAggregatedData` destructor into `AggregatingTransform.cpp`
- De-inline `QueryStatus::updateProgressIn/Out` into `ProcessList.cpp`
- Add explicit `CurrentThread.h` includes to `.cpp` files that relied on
transitive includes through the trimmed headers
Co-Authored-By: Claude Opus 4.6 <[email protected]>