[all-commits] [llvm/llvm-project] 59f9c3: [BOLT] Check for write errors before keeping outpu...
Rafael Auler via All-commits
all-commits at lists.llvm.org
Fri Apr 3 08:59:36 PDT 2026
Branch: refs/heads/users/rafaelauler/add-diskfull-error-bolt
Home: https://github.com/llvm/llvm-project
Commit: 59f9c390ab3e45d90de1bd571370ef68f8efc3be
https://github.com/llvm/llvm-project/commit/59f9c390ab3e45d90de1bd571370ef68f8efc3be
Author: Rafael Auler <rafaelauler at fb.com>
Date: 2026-04-03 (Fri, 03 Apr 2026)
Changed paths:
M bolt/lib/Rewrite/RewriteInstance.cpp
Log Message:
-----------
[BOLT] Check for write errors before keeping output file
Summary:
When the disk runs out of space during output file writing,
BOLT would crash with SIGSEGV/SIGABRT because raw_fd_ostream
silently records write errors and only reports them via abort()
in its destructor. This made it difficult to distinguish real
BOLT bugs from infrastructure issues in production monitoring.
Add an explicit error check on the output stream before calling
Out->keep(), so BOLT exits cleanly with exit code 1 and a clear
error message instead.
Test: manually verified with a full filesystem that BOLT now
prints "BOLT-ERROR: failed to write output file: No space left
on device" and exits with code 1.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list