This commit is contained in:
Daniel Samson
2026-07-12 16:04:58 +01:00
parent 8652b4a724
commit f5f0e15769
15 changed files with 65 additions and 51 deletions
+6 -5
View File
@@ -2023,7 +2023,10 @@ fn faultNull() void {
// access). `allowzero` skips the same null check on the cast. The write then
// hits the unmapped page 0 and takes a real hardware #PF.
var address: u64 = 0;
address = asm ("" : [ret] "=r" (-> u64) : [in] "0" (address));
address = asm (""
: [ret] "=r" (-> u64),
: [in] "0" (address),
);
const p: *allowzero volatile u64 = @ptrFromInt(address);
p.* = 1;
}
@@ -2049,8 +2052,7 @@ fn faultDoubleFault() void {
\\ud2
:
: [sp] "r" (bad_sp),
: .{ .memory = true }
);
: .{ .memory = true });
bad_sp += 0;
}
@@ -2069,8 +2071,7 @@ fn apDoubleFaultTask() void {
\\ud2
:
: [sp] "r" (bad_sp),
: .{ .memory = true }
);
: .{ .memory = true });
bad_sp += 0;
}