23.8 · Reading sanitizer output, exit codes and runtime traps
Sanitizers and runtime checks fail loudly, but only if you know what they print, what the process exit status is, and what they cannot see.
Mental model. A failure is evidence: read the message, the exit status, and ask what the check could not have caught.
Sanitizer runs
Exit codes and options, and why a clean TSan run proves little.
- What does a failing Address Sanitizer run look like to CI: exit status, ASAN_OPTIONS, and how do you read the report?
An ASan report has a fixed shape: the error kind and address (heap-buffer-overflow), the access (READ of size 8) with its stack, a line saying where the… - What does a Thread Sanitizer report look like, how does it report to CI, and why does a clean TSan run not prove the code race free?
TSan reports two accesses to the same address from different threads without ordering between them. The output names the kind (Swift access race or data race)…
Concurrency traps
What the runtime does when you break continuation, isolation and queue rules.
- Which runtime checks fire when you misuse continuations, MainActor.assumeIsolated or dispatch queues, and which of them crash?
Several concurrency mistakes are caught at run time, and they differ in severity. Resuming a checked continuation twice traps with “SWIFT TASK CONTINUATION…
More in Debugging & Instruments
- 23.1 · LLDB and breakpoints
- 23.2 · The view debugger, network inspection and memory bugs
- 23.3 · Sanitizers, and bugs that only appear in Release
- 23.4 · Unified logging: Logger, levels, privacy and reading logs back
- 23.5 · Crash reports, symbolication and a production diagnostics pipeline
- 23.6 · Console, sysdiagnose and reproducing a bug
- 23.7 · Schemes, test plans, simulators and derived data
- 23.9 · Diagnosing a hang, malloc debugging and leaks from the command line
- 23.10 · Demangling, atos and empty dSYMs, and log formatting