file-system: the mount-failure log has no scratch buffer (orphaned bounds fix)
The mount-failure diagnostic wrote through a fixed [96]u8 bufPrint buffer, which the bounds gate flags as an undeclared ceiling. Three ring appends instead — no buffer, no fixed length to justify. This fix was made during the V2a bounds work but never git-added, so the committed harness still carried the flagged buffer; committing it now cleans the tip.
This commit is contained in:
@@ -310,8 +310,11 @@ pub fn Server(comptime Engine: type) type {
|
|||||||
// The failure diagnostic goes to the kernel ring directly, not
|
// The failure diagnostic goes to the kernel ring directly, not
|
||||||
// through std.log — the mount that failed may be /system/logs
|
// through std.log — the mount that failed may be /system/logs
|
||||||
// itself, and a routed record would then have nowhere to land.
|
// itself, and a routed record would then have nowhere to land.
|
||||||
var line: [96]u8 = undefined;
|
// Three appends rather than a formatted line so there is no
|
||||||
_ = logging.write(std.fmt.bufPrint(&line, "file-system: could not mount {s}\n", .{m.prefix}) catch "file-system: a mount failed\n");
|
// scratch buffer (and so no fixed length to justify).
|
||||||
|
_ = logging.write("file-system: could not mount ");
|
||||||
|
_ = logging.write(m.prefix);
|
||||||
|
_ = logging.write("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mounted = true;
|
mounted = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user